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

Function getProjectVariableTemplate

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

Source from the content-addressed store, hash-verified

550}
551
552func getProjectVariableTemplate(opts *UpdateOptions, tenantVariables *[]variables.TenantProjectVariable) (*actiontemplates.ActionTemplateParameter, error) {
553 for _, v := range *tenantVariables {
554 if strings.EqualFold(v.ProjectName, opts.Project.Value) && strings.EqualFold(v.Template.Name, opts.Name.Value) {
555 return &v.Template, nil
556 }
557 }
558
559 return nil, fmt.Errorf("cannot find variable '%s'", opts.Name.Value)
560}
561
562func findTemplate(templates []*actiontemplates.ActionTemplateParameter, variableName string) (*actiontemplates.ActionTemplateParameter, error) {
563 for _, t := range templates {

Callers 1

PromptMissingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected