// Inputs returns the array of inputs that defines the Env.
773839
func (pairs EnvPairs) Inputs() []Input {
	sort.Sort(&(pairs.Pairs))

	var (
		lp     = len(pairs.Pairs)
		levels = make([]Input, lp)
		times  = make([]Input, lp-1)
	)
	for i, p := range pairs.Pairs {
		levels[i] = C(p[1])
		if i > 0 {
			times[i-1] = C(p[0] - pairs.Pairs[i-1][0])
		}
	}
	return Env{
		Levels: levels,
		Times:  times,
		Curve:  pairs.Curve,
	}.Inputs()
}
992266
func AddInputs(inputs ...InputWithScript) UpdateOption {
	return func(uo *updateOptions) {
		uo.inputs = append(uo.inputs, inputs...)
	}
}
499343
func (s *InputSecurityGroup) SetInputs(v []*string) *InputSecurityGroup {
	s.Inputs = v
	return s
}
1144180
func (in *Inputs) HasInputs() bool {
	if len(in.Artifacts) > 0 {
		return true
	}
	if len(in.Parameters) > 0 {
		return true
	}
	return false
}
816001
func (env *Environment) Init(args map[string]string) error {
	env.infix = "_"
	env.prefix = ""
	env.fields = make(map[string]string)

	if envPrefix, ok := args["prefix"]; ok {
		env.prefix = envPrefix
	}
	if envInfix, ok := args["infix"]; ok {
		env.infix = envInfix
	}

	if v := os.Getenv("GOFIGURE_ENV_ARRAY"); v == "1" || strings.ToLower(v) == "true" || strings.ToLower(v) == "y" {
		env.supportArrays = true
	}

	return nil
}
1001241
func (p *Provider) Input(
	input terraform.UIInput,
	c *terraform.ResourceConfig) (*terraform.ResourceConfig, error) {
	return schemaMap(p.Schema).Input(input, c)
}
1185323
func (e Env) Map() map[string]string {
	if len(e.env) == 0 {
		return nil
	}

	m := make(map[string]string, len(e.env))
	for k, entry := range e.env {
		ek, ev := splitEntryGivenKey(k, entry)
		m[ek] = ev
	}
	return m
}
164830
func (perc EnvPerc) Inputs() []Input {
	(&perc).defaults()

	return Env{
		Levels: []Input{C(0), perc.Level, C(0)},
		Times:  []Input{perc.Attack, perc.Release},
		Curve:  []Input{perc.Curve, perc.Curve},
	}.Inputs()
}
734255
func (e Environment) List() []corev1.EnvVar {
	env := []corev1.EnvVar{}
	for k, v := range e {
		env = append(env, corev1.EnvVar{
			Name:  k,
			Value: v,
		})
	}
	sort.Sort(sortedEnvVar(env))
	return env
}
500082
func (c Context) Env() map[string]string {
	osEnv := os.Environ()
	envVars := make(map[string]string, len(osEnv))
	for _, env := range osEnv {
		data := strings.SplitN(env, "=", 2)
		if len(data) == 2 && len(data[0]) > 0 {
			envVars[data[0]] = data[1]
		}
	}
	return envVars
}
562170
func (p *KVParam) EnvVars() (string, string) {
	if len(p.values) == 0 {
		return p.EnvName(), p.Default()
	}
	vals := make([]string, len(p.values))
	for i, v := range p.values {
		vals[i] = v.String()
	}
	return p.EnvName(), strings.Join(vals, p.sep())
}
291910
func generateEnvList(envs []*runtimeapi.KeyValue) (result []string) {
	for _, env := range envs {
		result = append(result, fmt.Sprintf("%s=%s", env.Key, env.Value))
	}
	return
}
356565
func (e *Env) Copy() *Env {
	e.Lock()
	defer e.Unlock()
	copy := Env{
		name:     e.name,
		env:      make(map[string]reflect.Value),
		typ:      make(map[string]reflect.Type),
		parent:   e.parent,
		external: e.external,
	}
	for name, value := range e.env {
		copy.env[name] = value
	}
	for name, typ := range e.typ {
		copy.typ[name] = typ
	}
	return &copy
}
517181
func (api *API) GetInputObjects(addresses Hashes, balances []uint64, start uint64, secLvl SecurityLevel) Inputs {
	addrs := []Input{}
	var totalBalance uint64
	for i := range addresses {
		value := balances[i]
		if value <= 0 {
			continue
		}
		addrs = append(addrs, Input{
			Address: addresses[i], Security: secLvl,
			Balance: value, KeyIndex: start + uint64(i)},
		)
		totalBalance += value
	}
	return Inputs{Inputs: addrs, TotalBalance: totalBalance}
}
607458
func main() {
	// env represents one interpreter:
	// It will have one parsing and one execution goroutine.
	env = NewGlisp()

	// cfg configures the env
	cfg := &GlsipConfig{
		// some of the options:
		ExitOnFailure: false, // action to take on error
		Sandboxed:     false, // restrict scripts to sandobox?
		Quiet:         false, // display startup banner?
		Trace:         false, // for debugging, print actions step-by-step
	}

	// start a repl
	Repl(env, cfg)
}
1221148
func Env(e *Config) Option {
	return func(o *options) {
		o.env = append(o.env, e)
	}
}
179353
func (step *StepModel) ValidateInputAndOutputEnvs(checkRequiredFields bool) error {
	validateEnvs := func(envs []envmanModels.EnvironmentItemModel) error {
		for _, env := range envs {
			key, _, err := env.GetKeyValuePair()
			if err != nil {
				return fmt.Errorf("Invalid environment (%v), err: %s", env, err)
			}

			if err := env.Validate(); err != nil {
				return fmt.Errorf("Invalid environment (%s), err: %s", key, err)
			}

			if checkRequiredFields {
				options, err := env.GetOptions()
				if err != nil {
					return fmt.Errorf("Invalid environment (%s), err: %s", key, err)
				}

				if options.Title == nil || *options.Title == "" {
					return fmt.Errorf("Invalid environment (%s), err: missing or empty title", key)
				}

				isSensitive := options.IsSensitive
				if isSensitive == nil {
					isSensitive = pointers.NewBoolPtr(envmanModels.DefaultIsSensitive)
				}

				isExpand := options.IsExpand
				if isExpand == nil {
					isExpand = pointers.NewBoolPtr(envmanModels.DefaultIsExpand)
				}

				if *isSensitive && !(*isExpand) {
					return fmt.Errorf("Invalid environment (%s), err: is_sensitive option is true but is_expand option is not. For sensitive inputs direct value is not allowed", key)
				}
			}
		}
		return nil
	}

	return validateEnvs(append(step.Inputs, step.Outputs...))
}