diff options
author | Tamir Duberstein <tamird@google.com> | 2019-03-25 14:58:41 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-03-25 14:59:58 -0700 |
commit | 23a5306b5c556e541deaf60512f605f17c2d8db2 (patch) | |
tree | 8f05f28c24c8eceb3b0f1ca17d509947cd79e897 /pkg | |
parent | f3723f805989d0c5956fbb6aa88b1cd9ac20753c (diff) |
Resolve stringer TODO
PiperOrigin-RevId: 240224782
Change-Id: Iab4e4e7047b2d022f15e807c2348685d8e972020
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/dhcp/dhcp.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/pkg/dhcp/dhcp.go b/pkg/dhcp/dhcp.go index ad11e178a..6945bcd35 100644 --- a/pkg/dhcp/dhcp.go +++ b/pkg/dhcp/dhcp.go @@ -39,8 +39,7 @@ func (cfg *Config) decode(opts []option) error { for _, opt := range opts { b := opt.body if !opt.code.lenValid(len(b)) { - // TODO: s/%v/%s/ when `go vet` is smarter. - return fmt.Errorf("%v: bad length: %d", opt.code, len(b)) + return fmt.Errorf("%s: bad length: %d", opt.code, len(b)) } switch opt.code { case optLeaseTime: @@ -231,8 +230,7 @@ func (opts options) dhcpMsgType() (dhcpMsgType, error) { for _, opt := range opts { if opt.code == optDHCPMsgType { if len(opt.body) != 1 { - // TODO: s/%v/%s/ when `go vet` is smarter. - return 0, fmt.Errorf("%v: bad length: %d", opt.code, len(opt.body)) + return 0, fmt.Errorf("%s: bad length: %d", opt.code, len(opt.body)) } v := opt.body[0] if v <= 0 || v >= 8 { |