Add Makefile targets for go vet and go fix, use named struct fields in tests, apply go fix improvements
This commit is contained in:
parent
a96b765794
commit
30a5786adf
7 changed files with 34 additions and 28 deletions
|
|
@ -28,8 +28,8 @@ func WriteValue(buff *bytes.Buffer, val any) (n int, err error) {
|
|||
return buff.Write(o)
|
||||
}
|
||||
case string:
|
||||
if strings.HasPrefix(v, "!") {
|
||||
return buff.WriteString(strings.TrimPrefix(v, "!"))
|
||||
if after, ok := strings.CutPrefix(v, "!"); ok {
|
||||
return buff.WriteString(after)
|
||||
}
|
||||
return buff.WriteString(v)
|
||||
case int:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue