github.com/searKing/golang/go@v1.2.117/exp/constraints/constraints.go (about) 1 // Copyright 2022 The searKing Author. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // Package constraints defines a set of useful constraints to be used 6 // with type parameters. 7 package constraints 8 9 import "golang.org/x/exp/constraints" 10 11 // Number is a constraint that permits any number type: any type 12 // that supports the operators < <= >= > - + * /. 13 // If future releases of Go add new number types, 14 // this constraint will be modified to include them. 15 type Number interface { 16 constraints.Integer | constraints.Float 17 }