mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-23 21:42:23 -05:00
Bumps [github.com/gookit/config/v2](https://github.com/gookit/config) from 2.2.3 to 2.2.4. - [Release notes](https://github.com/gookit/config/releases) - [Commits](https://github.com/gookit/config/compare/v2.2.3...v2.2.4) --- updated-dependencies: - dependency-name: github.com/gookit/config/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
71 lines
1.2 KiB
Go
71 lines
1.2 KiB
Go
package comdef
|
|
|
|
import (
|
|
"fmt"
|
|
"io"
|
|
)
|
|
|
|
// ByteStringWriter interface
|
|
type ByteStringWriter interface {
|
|
io.Writer
|
|
io.ByteWriter
|
|
io.StringWriter
|
|
fmt.Stringer
|
|
}
|
|
|
|
// StringWriteStringer interface
|
|
type StringWriteStringer interface {
|
|
io.StringWriter
|
|
fmt.Stringer
|
|
}
|
|
|
|
// Int64able interface
|
|
type Int64able interface {
|
|
Int64() (int64, error)
|
|
}
|
|
|
|
//
|
|
//
|
|
// Matcher type
|
|
//
|
|
//
|
|
|
|
// Matcher interface
|
|
type Matcher[T any] interface {
|
|
Match(s T) bool
|
|
}
|
|
|
|
// MatchFunc definition. implements Matcher interface
|
|
type MatchFunc[T any] func(v T) bool
|
|
|
|
// Match satisfies the Matcher interface
|
|
func (fn MatchFunc[T]) Match(v T) bool {
|
|
return fn(v)
|
|
}
|
|
|
|
// StringMatcher interface
|
|
type StringMatcher interface {
|
|
Match(s string) bool
|
|
}
|
|
|
|
// StringMatchFunc definition
|
|
type StringMatchFunc func(s string) bool
|
|
|
|
// Match satisfies the StringMatcher interface
|
|
func (fn StringMatchFunc) Match(s string) bool {
|
|
return fn(s)
|
|
}
|
|
|
|
// StringHandler interface
|
|
type StringHandler interface {
|
|
Handle(s string) string
|
|
}
|
|
|
|
// StringHandleFunc definition
|
|
type StringHandleFunc func(s string) string
|
|
|
|
// Handle satisfies the StringHandler interface
|
|
func (fn StringHandleFunc) Handle(s string) string {
|
|
return fn(s)
|
|
}
|