mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-13 03:42:35 -06:00
f5f00a9108
Bumps the dependencies group with 10 updates in the / directory: | Package | From | To | | --- | --- | --- | | [github.com/containerd/containerd/v2](https://github.com/containerd/containerd) | `2.1.1` | `2.1.3` | | [github.com/dgraph-io/badger/v4](https://github.com/dgraph-io/badger) | `4.7.0` | `4.8.0` | | [github.com/sergi/go-diff](https://github.com/sergi/go-diff) | `1.3.1` | `1.4.0` | | [github.com/spf13/pflag](https://github.com/spf13/pflag) | `1.0.6` | `1.0.7` | | [github.com/tchap/go-patricia/v2](https://github.com/tchap/go-patricia) | `2.3.2` | `2.3.3` | | [github.com/vektah/gqlparser/v2](https://github.com/vektah/gqlparser) | `2.5.28` | `2.5.30` | | [golang.org/x/net](https://github.com/golang/net) | `0.41.0` | `0.42.0` | | [golang.org/x/time](https://github.com/golang/time) | `0.11.0` | `0.12.0` | | [google.golang.org/grpc](https://github.com/grpc/grpc-go) | `1.73.0` | `1.74.2` | | [sigs.k8s.io/yaml](https://github.com/kubernetes-sigs/yaml) | `1.4.0` | `1.6.0` | Updates `github.com/containerd/containerd/v2` from 2.1.1 to 2.1.3 - [Release notes](https://github.com/containerd/containerd/releases) - [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md) - [Commits](https://github.com/containerd/containerd/compare/v2.1.1...v2.1.3) Updates `github.com/dgraph-io/badger/v4` from 4.7.0 to 4.8.0 - [Release notes](https://github.com/dgraph-io/badger/releases) - [Changelog](https://github.com/hypermodeinc/badger/blob/main/CHANGELOG.md) - [Commits](https://github.com/dgraph-io/badger/compare/v4.7.0...v4.8.0) Updates `github.com/sergi/go-diff` from 1.3.1 to 1.4.0 - [Commits](https://github.com/sergi/go-diff/compare/v1.3.1...v1.4.0) Updates `github.com/spf13/pflag` from 1.0.6 to 1.0.7 - [Release notes](https://github.com/spf13/pflag/releases) - [Commits](https://github.com/spf13/pflag/compare/v1.0.6...v1.0.7) Updates `github.com/tchap/go-patricia/v2` from 2.3.2 to 2.3.3 - [Commits](https://github.com/tchap/go-patricia/compare/v2.3.2...v2.3.3) Updates `github.com/vektah/gqlparser/v2` from 2.5.28 to 2.5.30 - [Release notes](https://github.com/vektah/gqlparser/releases) - [Commits](https://github.com/vektah/gqlparser/compare/v2.5.28...v2.5.30) Updates `golang.org/x/net` from 0.41.0 to 0.42.0 - [Commits](https://github.com/golang/net/compare/v0.41.0...v0.42.0) Updates `golang.org/x/time` from 0.11.0 to 0.12.0 - [Commits](https://github.com/golang/time/compare/v0.11.0...v0.12.0) Updates `google.golang.org/grpc` from 1.73.0 to 1.74.2 - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.73.0...v1.74.2) Updates `sigs.k8s.io/yaml` from 1.4.0 to 1.6.0 - [Release notes](https://github.com/kubernetes-sigs/yaml/releases) - [Changelog](https://github.com/kubernetes-sigs/yaml/blob/master/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/yaml/compare/v1.4.0...v1.6.0) --- updated-dependencies: - dependency-name: github.com/containerd/containerd/v2 dependency-version: 2.1.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dependencies - dependency-name: github.com/dgraph-io/badger/v4 dependency-version: 4.8.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: dependencies - dependency-name: github.com/sergi/go-diff dependency-version: 1.4.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: dependencies - dependency-name: github.com/spf13/pflag dependency-version: 1.0.7 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dependencies - dependency-name: github.com/tchap/go-patricia/v2 dependency-version: 2.3.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dependencies - dependency-name: github.com/vektah/gqlparser/v2 dependency-version: 2.5.30 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dependencies - dependency-name: golang.org/x/net dependency-version: 0.42.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: dependencies - dependency-name: golang.org/x/time dependency-version: 0.12.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: dependencies - dependency-name: google.golang.org/grpc dependency-version: 1.74.2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: dependencies - dependency-name: sigs.k8s.io/yaml dependency-version: 1.6.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: dependencies ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
38 lines
1.4 KiB
Go
38 lines
1.4 KiB
Go
package pflag
|
|
|
|
// -- func Value
|
|
type funcValue func(string) error
|
|
|
|
func (f funcValue) Set(s string) error { return f(s) }
|
|
|
|
func (f funcValue) Type() string { return "func" }
|
|
|
|
func (f funcValue) String() string { return "" } // same behavior as stdlib 'flag' package
|
|
|
|
// Func defines a func flag with specified name, callback function and usage string.
|
|
//
|
|
// The callback function will be called every time "--{name}={value}" (or equivalent) is
|
|
// parsed on the command line, with "{value}" as an argument.
|
|
func (f *FlagSet) Func(name string, usage string, fn func(string) error) {
|
|
f.FuncP(name, "", usage, fn)
|
|
}
|
|
|
|
// FuncP is like Func, but accepts a shorthand letter that can be used after a single dash.
|
|
func (f *FlagSet) FuncP(name string, shorthand string, usage string, fn func(string) error) {
|
|
var val Value = funcValue(fn)
|
|
f.VarP(val, name, shorthand, usage)
|
|
}
|
|
|
|
// Func defines a func flag with specified name, callback function and usage string.
|
|
//
|
|
// The callback function will be called every time "--{name}={value}" (or equivalent) is
|
|
// parsed on the command line, with "{value}" as an argument.
|
|
func Func(name string, usage string, fn func(string) error) {
|
|
CommandLine.FuncP(name, "", usage, fn)
|
|
}
|
|
|
|
// FuncP is like Func, but accepts a shorthand letter that can be used after a single dash.
|
|
func FuncP(name, shorthand string, usage string, fn func(string) error) {
|
|
CommandLine.FuncP(name, shorthand, usage, fn)
|
|
}
|