Skip to content

Commit

Permalink
Merge pull request #53 from KosToZyB/master
Browse files Browse the repository at this point in the history
Fixed golint warnings
  • Loading branch information
pborman committed Oct 24, 2019
2 parents 8b1b929 + 4cb35d9 commit 5b6091a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
10 changes: 6 additions & 4 deletions sql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ import (
)

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

Expand Down
2 changes: 1 addition & 1 deletion time.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func GetTime() (Time, uint16, error) { return guuid.GetTime() }
// 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) }

Expand Down
4 changes: 2 additions & 2 deletions uuid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ func testDCE(t *testing.T, name string, uuid UUID, domain Domain, id uint32) {
}
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)
}
Expand All @@ -277,7 +277,7 @@ func TestDCE(t *testing.T) {
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
Expand Down
2 changes: 1 addition & 1 deletion version4.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package uuid

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.
Expand Down

0 comments on commit 5b6091a

Please sign in to comment.