Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for BindEnv (0.1 sec)

  1. tools/istio-iptables/pkg/cmd/root.go

    		&cfg.KubeVirtInterfaces)
    
    	flag.BindEnv(fs, constants.InboundTProxyMark, "t", "", &cfg.InboundTProxyMark)
    
    	flag.BindEnv(fs, constants.InboundTProxyRouteTable, "r", "", &cfg.InboundTProxyRouteTable)
    
    	flag.BindEnv(fs, constants.DryRun, "n", "Do not call any external dependencies like iptables.",
    		&cfg.DryRun)
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 18 17:36:41 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  2. tools/istio-clean-iptables/pkg/cmd/root.go

    	fs := cmd.Flags()
    	flag.BindEnv(fs, constants.DryRun, "n", "Do not call any external dependencies like iptables.",
    		&cfg.DryRun)
    
    	flag.BindEnv(fs, constants.ProxyUID, "u",
    		"Specify the UID of the user for which the redirection is not applied. Typically, this is the UID of the proxy container.",
    		&cfg.ProxyUID)
    
    	flag.BindEnv(fs, constants.ProxyGID, "g",
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Mar 11 17:46:23 UTC 2024
    - 3K bytes
    - Viewed (0)
  3. pkg/flag/flag.go

    		fs.DurationVarP(d, name, shorthand, *d, usage)
    	case *uint16:
    		fs.Uint16VarP(d, name, shorthand, *d, usage)
    	}
    }
    
    // BindEnv behaves like Bind, but additionally allows an environment variable to override.
    // This will transform to name field: foo-bar becomes FOO_BAR.
    func BindEnv[T Flaggable](fs *pflag.FlagSet, name, shorthand, usage string, val *T) {
    	Bind(fs, name, shorthand, usage, val)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Nov 01 04:37:36 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  4. pkg/flag/flag_test.go

    	opts := Options{
    		B: "b-def",
    	}
    	test.SetEnvForTest(t, "TEST_ENV", "from-env")
    	fs := pflag.NewFlagSet("test", pflag.ContinueOnError)
    	Bind(fs, "a", "", "desc", &opts.A)
    	Bind(fs, "bool", "", "desc", &opts.Bool)
    	BindEnv(fs, "test-env", "", "desc", &opts.Env)
    	fs.Set("a", "a-set")
    	fs.Set("bool", "true")
    	assert.Equal(t, opts, Options{
    		A:    "a-set",
    		B:    "b-def",
    		Env:  "from-env",
    		Bool: true,
    	})
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Nov 01 04:37:36 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  5. src/cmd/go/internal/envcmd/env.go

    			if *envJson {
    				var es []cfg.EnvVar
    				for _, name := range args {
    					e := cfg.EnvVar{Name: name, Value: findEnv(env, name)}
    					es = append(es, e)
    				}
    				env = es
    			} else {
    				// Print just the values, without names.
    				for _, name := range args {
    					fmt.Printf("%s\n", findEnv(env, name))
    				}
    				return
    			}
    		} else {
    			// Show only the changed, named vars.
    			var es []cfg.EnvVar
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 17:13:51 UTC 2024
    - 19.6K bytes
    - Viewed (0)
Back to top