-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deps: Remove golang.org/x/exp dependency
Reference: golang/go#61914 It was only used for the `constraints` package, the type definitions are relatively trivial and static, and the Go language maintainers are not sure if/where these will live in the standard library, which implies (at least to me) they could also disappear from x/exp.
- Loading branch information
Showing
4 changed files
with
29 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright (c) HashiCorp, Inc. | ||
// SPDX-License-Identifier: MPL-2.0 | ||
|
||
package config | ||
|
||
// anyFloat is a constraint that permits any floating-point type. This type | ||
// definition is copied rather than depending on x/exp/constraints since the | ||
// dependency is otherwise unneeded, the definition is relatively trivial and | ||
// static, and the Go language maintainers are not sure if/where these will live | ||
// in the standard library. | ||
// | ||
// Reference: https://github.com/golang/go/issues/61914 | ||
type anyFloat interface { | ||
~float32 | ~float64 | ||
} | ||
|
||
// anyInteger is a constraint that permits any integer type. This type | ||
// definition is copied rather than depending on x/exp/constraints since the | ||
// dependency is otherwise unneeded, the definition is relatively trivial and | ||
// static, and the Go language maintainers are not sure if/where these will live | ||
// in the standard library. | ||
// | ||
// Reference: https://github.com/golang/go/issues/61914 | ||
type anyInteger interface { | ||
~int | ~int8 | ~int16 | ~int32 | ~int64 | | ||
~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters