👌Linting

This commit is contained in:
Bruce Marriner 2019-04-10 01:12:21 +00:00
parent c3f5528809
commit 272c8fb215
2 changed files with 9 additions and 9 deletions

View File

@ -16,19 +16,19 @@ var (
// You may customize this to set a different epoch for your application.
Epoch int64 = 1288834974657
// Number of bits to use for Node
// NodeBits holds the number of bits to use for Node
// Remember, you have a total 22 bits to share between Node/Step
NodeBits uint8 = 10
// Number of bits to use for Step
// StepBits holds the number of bits to use for Step
// Remember, you have a total 22 bits to share between Node/Step
StepBits uint8 = 12
nodeMax int64 = -1 ^ (-1 << NodeBits)
nodeMask int64 = nodeMax << StepBits
nodeMask = nodeMax << StepBits
stepMask int64 = -1 ^ (-1 << StepBits)
timeShift uint8 = NodeBits + StepBits
nodeShift uint8 = StepBits
timeShift = NodeBits + StepBits
nodeShift = StepBits
)
const encodeBase32Map = "ybndrfg8ejkmcpqxot1uwisza345h769"

View File

@ -50,7 +50,7 @@ func TestMarshalsIntBytes(t *testing.T) {
func TestUnmarshalJSON(t *testing.T) {
tt := []struct {
json string
expectedId ID
expectedID ID
expectedErr error
}{
{`"13587"`, 13587, nil},
@ -65,8 +65,8 @@ func TestUnmarshalJSON(t *testing.T) {
t.Errorf("Expected to get error '%s' decoding JSON, but got '%s'", tc.expectedErr, err)
}
if id != tc.expectedId {
t.Errorf("Expected to get ID '%s' decoding JSON, but got '%s'", tc.expectedId, id)
if id != tc.expectedID {
t.Errorf("Expected to get ID '%s' decoding JSON, but got '%s'", tc.expectedID, id)
}
}
}