github.com/searKing/golang/go@v1.2.74/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
     6  
     7  import "golang.org/x/exp/constraints"
     8  
     9  // Number is a constraint that permits any number type: any type
    10  // that supports the operators < <= >= > - + * /.
    11  // If future releases of Go add new number types,
    12  // this constraint will be modified to include them.
    13  type Number interface {
    14  	constraints.Integer | constraints.Float
    15  }