MCPcopy Create free account
hub / github.com/OctopusDeploy/cli / getCommonVariableTemplate

Function getCommonVariableTemplate

pkg/cmd/tenant/variables/update/update.go:542–550  ·  view source on GitHub ↗
(opts *UpdateOptions, tenantVariables *[]variables.TenantCommonVariable)

Source from the content-addressed store, hash-verified

540}
541
542func getCommonVariableTemplate(opts *UpdateOptions, tenantVariables *[]variables.TenantCommonVariable) (*actiontemplates.ActionTemplateParameter, error) {
543 for _, v := range *tenantVariables {
544 if strings.EqualFold(v.LibraryVariableSetName, opts.LibraryVariableSet.Value) && strings.EqualFold(v.Template.Name, opts.Name.Value) {
545 return &v.Template, nil
546 }
547 }
548
549 return nil, fmt.Errorf("cannot find variable '%s'", opts.Name.Value)
550}
551
552func getProjectVariableTemplate(opts *UpdateOptions, tenantVariables *[]variables.TenantProjectVariable) (*actiontemplates.ActionTemplateParameter, error) {
553 for _, v := range *tenantVariables {

Callers 1

PromptMissingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected