diff --git a/datetime/datetime.go b/datetime/datetime.go index e8f1bdea7..abd4d51d2 100644 --- a/datetime/datetime.go +++ b/datetime/datetime.go @@ -86,7 +86,7 @@ func NewDatetime(t time.Time) (*Datetime, error) { seconds := t.Unix() if seconds < minSeconds || seconds > maxSeconds { - return nil, fmt.Errorf("Time %s is out of supported range.", t) + return nil, fmt.Errorf("time %s is out of supported range", t) } dt := new(Datetime) diff --git a/datetime/datetime_test.go b/datetime/datetime_test.go index 7d9dbe29a..7b51ba348 100644 --- a/datetime/datetime_test.go +++ b/datetime/datetime_test.go @@ -286,7 +286,7 @@ func (t *Tuple1) DecodeMsgpack(d *decoder) error { return err } if l != 1 { - return fmt.Errorf("array len doesn't match: %d", l) + return fmt.Errorf("Array len doesn't match: %d", l) } err = d.Decode(&t.Datetime) if err != nil { @@ -315,7 +315,7 @@ func (ev *Event) DecodeMsgpack(d *decoder) error { return err } if l != 2 { - return fmt.Errorf("array len doesn't match: %d", l) + return fmt.Errorf("Array len doesn't match: %d", l) } if ev.Location, err = d.DecodeString(); err != nil { return err @@ -326,7 +326,7 @@ func (ev *Event) DecodeMsgpack(d *decoder) error { } var ok bool if ev.Datetime, ok = toDatetime(res); !ok { - return fmt.Errorf("datetime doesn't match") + return fmt.Errorf("Datetime doesn't match") } return nil } @@ -352,7 +352,7 @@ func (c *Tuple2) DecodeMsgpack(d *decoder) error { return err } if l != 3 { - return fmt.Errorf("array len doesn't match: %d", l) + return fmt.Errorf("Array len doesn't match: %d", l) } if c.Cid, err = d.DecodeUint(); err != nil { return err diff --git a/datetime/example_test.go b/datetime/example_test.go index 97359f43c..cabaf26bc 100644 --- a/datetime/example_test.go +++ b/datetime/example_test.go @@ -25,14 +25,14 @@ func Example() { } conn, err := tarantool.Connect("127.0.0.1:3013", opts) if err != nil { - fmt.Printf("error in connect is %v", err) + fmt.Printf("Error in connect is %v", err) return } var datetime = "2013-10-28T17:51:56.000000009Z" tm, err := time.Parse(time.RFC3339, datetime) if err != nil { - fmt.Printf("error in time.Parse() is %v", err) + fmt.Printf("Error in time.Parse() is %v", err) return } dt, err := NewDatetime(tm) @@ -47,7 +47,7 @@ func Example() { // Replace a tuple with datetime. resp, err := conn.Replace(space, []interface{}{dt}) if err != nil { - fmt.Printf("error in replace is %v", err) + fmt.Printf("Error in replace is %v", err) return } respDt := resp.Data[0].([]interface{})[0].(Datetime) @@ -60,7 +60,7 @@ func Example() { var limit uint32 = 1 resp, err = conn.Select(space, index, offset, limit, tarantool.IterEq, []interface{}{dt}) if err != nil { - fmt.Printf("error in select is %v", err) + fmt.Printf("Error in select is %v", err) return } respDt = resp.Data[0].([]interface{})[0].(Datetime) @@ -71,7 +71,7 @@ func Example() { // Delete a tuple with datetime. resp, err = conn.Delete(space, index, []interface{}{dt}) if err != nil { - fmt.Printf("error in delete is %v", err) + fmt.Printf("Error in delete is %v", err) return } respDt = resp.Data[0].([]interface{})[0].(Datetime)