Code refactoring (#143)

- simplify code
- prealoc slices
- check errors in tests
- regexp Compile replaced with MustCompile
- uint* cannot be negative
This commit is contained in:
Evgeniy Kulikov 2019-02-19 16:22:33 +03:00 committed by fabwa
parent 9c24bf9139
commit cdba88b9f2
12 changed files with 35 additions and 26 deletions

View file

@ -37,7 +37,7 @@ func TestStateFromString(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, faultState|breakState, s)
s, err = StateFromString("HALT, KEK")
_, err = StateFromString("HALT, KEK")
assert.Error(t, err)
}