From b1af8fd87760b34e3ff2fd3bda38f211815a0473 Mon Sep 17 00:00:00 2001 From: Terin Stock Date: Sun, 9 Mar 2025 17:47:56 +0100 Subject: [chore] remove vendor --- vendor/github.com/spf13/cast/indirect.go | 37 -------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 vendor/github.com/spf13/cast/indirect.go (limited to 'vendor/github.com/spf13/cast/indirect.go') diff --git a/vendor/github.com/spf13/cast/indirect.go b/vendor/github.com/spf13/cast/indirect.go deleted file mode 100644 index 093345f73..000000000 --- a/vendor/github.com/spf13/cast/indirect.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright © 2014 Steve Francia . -// -// Use of this source code is governed by an MIT-style -// license that can be found in the LICENSE file. - -package cast - -import ( - "reflect" -) - -// From html/template/content.go -// Copyright 2011 The Go Authors. All rights reserved. -// indirect returns the value, after dereferencing as many times -// as necessary to reach the base type (or nil). -func indirect(i any) (any, bool) { - if i == nil { - return nil, false - } - - if t := reflect.TypeOf(i); t.Kind() != reflect.Ptr { - // Avoid creating a reflect.Value if it's not a pointer. - return i, false - } - - v := reflect.ValueOf(i) - - for v.Kind() == reflect.Ptr || (v.Kind() == reflect.Interface && v.Elem().Kind() == reflect.Ptr) { - if v.IsNil() { - return nil, true - } - - v = v.Elem() - } - - return v.Interface(), true -} -- cgit v1.3