Merge pull request #53 from KosToZyB/master
Fixed golint warnings
diff --git a/sql_test.go b/sql_test.go
index 1030951..9e286c0 100644
--- a/sql_test.go
+++ b/sql_test.go
@@ -10,10 +10,12 @@
)
func TestScan(t *testing.T) {
- var stringTest string = "f47ac10b-58cc-0372-8567-0e02b2c3d479"
- var byteTest []byte = Parse(stringTest)
- var badTypeTest int = 6
- var invalidTest string = "f47ac10b-58cc-0372-8567-0e02b2c3d4"
+ var (
+ stringTest = "f47ac10b-58cc-0372-8567-0e02b2c3d479"
+ byteTest = []byte(Parse(stringTest))
+ badTypeTest = 6
+ invalidTest = "f47ac10b-58cc-0372-8567-0e02b2c3d4"
+ )
// sunny day tests
diff --git a/time.go b/time.go
index 5c0960d..7286824 100644
--- a/time.go
+++ b/time.go
@@ -29,7 +29,7 @@
// for
func ClockSequence() int { return guuid.ClockSequence() }
-// SetClockSeq sets the clock sequence to the lower 14 bits of seq. Setting to
+// SetClockSequence sets the clock sequence to the lower 14 bits of seq. Setting to
// -1 causes a new sequence to be generated.
func SetClockSequence(seq int) { guuid.SetClockSequence(seq) }
diff --git a/uuid_test.go b/uuid_test.go
index 7e9d144..f7ded3f 100644
--- a/uuid_test.go
+++ b/uuid_test.go
@@ -261,7 +261,7 @@
}
if v, ok := uuid.Id(); !ok || v != id {
if !ok {
- t.Errorf("%s: %d: Id failed", name, uuid)
+ t.Errorf("%s: %d: ID failed", name, uuid)
} else {
t.Errorf("%s: %s: expected id %d, got %d", name, uuid, id, v)
}
@@ -277,7 +277,7 @@
type badRand struct{}
func (r badRand) Read(buf []byte) (int, error) {
- for i, _ := range buf {
+ for i := range buf {
buf[i] = byte(i)
}
return len(buf), nil
diff --git a/version4.go b/version4.go
index b459d46..767dd0c 100644
--- a/version4.go
+++ b/version4.go
@@ -6,7 +6,7 @@
import guuid "github.com/google/uuid"
-// Random returns a Random (Version 4) UUID or panics.
+// NewRandom returns a Random (Version 4) UUID or panics.
//
// The strength of the UUIDs is based on the strength of the crypto/rand
// package.