mirror of
https://git.uploadfilter24.eu/lerentis/terraform-provider-gitea.git
synced 2024-11-16 15:08:12 +00:00
b4859cda6b
Bumps [github.com/hashicorp/terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs) from 0.7.0 to 0.13.0. - [Release notes](https://github.com/hashicorp/terraform-plugin-docs/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-docs/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-docs/compare/v0.7.0...v0.13.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-docs dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
28 lines
548 B
Go
28 lines
548 B
Go
package sprig
|
|
|
|
import (
|
|
"fmt"
|
|
"reflect"
|
|
)
|
|
|
|
// typeIs returns true if the src is the type named in target.
|
|
func typeIs(target string, src interface{}) bool {
|
|
return target == typeOf(src)
|
|
}
|
|
|
|
func typeIsLike(target string, src interface{}) bool {
|
|
t := typeOf(src)
|
|
return target == t || "*"+target == t
|
|
}
|
|
|
|
func typeOf(src interface{}) string {
|
|
return fmt.Sprintf("%T", src)
|
|
}
|
|
|
|
func kindIs(target string, src interface{}) bool {
|
|
return target == kindOf(src)
|
|
}
|
|
|
|
func kindOf(src interface{}) string {
|
|
return reflect.ValueOf(src).Kind().String()
|
|
}
|