diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-01-01 17:49:11 -0700 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-01-01 22:42:08 -0700 |
commit | 493ec396fab32d9e8859e34ad497fdb0a910a33c (patch) | |
tree | e174a7676cbe222b343004336b53e37cd37101a7 /lib/binstruct/size.go | |
parent | 95c8965e8b897aa69a3fbdea42c79513f55457ad (diff) |
lint: Turn on forcetypeassert
Diffstat (limited to 'lib/binstruct/size.go')
-rw-r--r-- | lib/binstruct/size.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/binstruct/size.go b/lib/binstruct/size.go index 365da85..52fa380 100644 --- a/lib/binstruct/size.go +++ b/lib/binstruct/size.go @@ -1,4 +1,4 @@ -// Copyright (C) 2022 Luke Shumaker <lukeshu@lukeshu.com> +// Copyright (C) 2022-2023 Luke Shumaker <lukeshu@lukeshu.com> // // SPDX-License-Identifier: GPL-2.0-or-later @@ -30,6 +30,7 @@ var ( func staticSize(typ reflect.Type) (int, error) { if typ.Implements(staticSizerType) { + //nolint:forcetypeassert // Already did a type check via reflection. return reflect.New(typ).Elem().Interface().(StaticSizer).BinaryStaticSize(), nil } if typ.Implements(marshalerType) || typ.Implements(unmarshalerType) { |