// CanonicalName returns
//
//   "{{.BranchName}}" in case it is not empty, and
//   "{{.Remote}}/{{.RemoteBranchName}}" otherwise.
199423
func (branch *GitBranch) CanonicalName() string {
	if name := branch.BranchName; name != "" {
		return name
	} else {
		return branch.FullRemoteBranchName()
	}
}
1251899
func (s *StopJobInput) SetBranchName(v string) *StopJobInput {
	s.BranchName = &v
	return s
}
707262
func (s *DeleteBranchInput) SetBranchName(v string) *DeleteBranchInput {
	s.BranchName = &v
	return s
}
963707
func (n Name) Canonicalize(mech_type *OID) (canonical *Name, err error) {
	canonical = &Name{
		Lib: n.Lib,
	}

	var min C.OM_uint32
	maj := C.wrap_gss_canonicalize_name(n.Fp_gss_canonicalize_name, &min,
		n.C_gss_name_t, mech_type.C_gss_OID, &canonical.C_gss_name_t)
	err = n.stashLastStatus(maj, min)
	if err != nil {
		return nil, err
	}

	return canonical, nil
}
719321
func (s *Service) Canonicalize(job string, taskGroup string, task string) {
	// Ensure empty lists are treated as null to avoid scheduler issues when
	// using DeepEquals
	if len(s.Tags) == 0 {
		s.Tags = nil
	}
	if len(s.CanaryTags) == 0 {
		s.CanaryTags = nil
	}
	if len(s.Checks) == 0 {
		s.Checks = nil
	}

	s.Name = args.ReplaceEnv(s.Name, map[string]string{
		"JOB":       job,
		"TASKGROUP": taskGroup,
		"TASK":      task,
		"BASE":      fmt.Sprintf("%s-%s-%s", job, taskGroup, task),
	},
	)

	for _, check := range s.Checks {
		check.Canonicalize(s.Name)
	}
}
1118844
func (r *RepositoryTag) GetName() string {
	if r == nil || r.Name == nil {
		return ""
	}
	return *r.Name
}
21279
func osName() string {
	name, err := syscall.Sysctl("kern.ostype")
	if err != nil {
		return runtime.GOOS
	}
	return name
}
800631
func (c *CommitAuthor) GetName() string {
	if c == nil || c.Name == nil {
		return ""
	}
	return *c.Name
}
375574
func (g *Gitignore) GetName() string {
	if g == nil || g.Name == nil {
		return ""
	}
	return *g.Name
}
437952
func (r *RepositoryContent) GetName() string {
	if r == nil || r.Name == nil {
		return ""
	}
	return *r.Name
}
743667
func (a *ActionDefinition) CanonicalScheme() string {
	if a.WebSocket() {
		for _, s := range a.EffectiveSchemes() {
			if s == "wss" {
				return s
			}
		}
		return "ws"
	}
	for _, s := range a.EffectiveSchemes() {
		if s == "https" {
			return s
		}
	}
	return "http"
}
1219081
func netName(chainParams *chaincfg.Params) string {
	if chainParams == nil {
		return "invalid"
	}
	if strings.HasPrefix(strings.ToLower(chainParams.Name), "testnet") {
		return "Testnet"
	}
	return strings.Title(chainParams.Name)
}
645961
func (n *Node) Fullname() string {
	if n.Cluster != defaults.ClusterName {
		return path.Join(n.Cluster, n.Name)
	}

	return n.Name
}
967303
func (s *GetBranchInput) SetBranchName(v string) *GetBranchInput {
	s.BranchName = &v
	return s
}
718876
func Canonicalize(nsPath string) string {
	if nsPath == "" {
		return ""
	}

	// Canonicalize the path to not have a '/' prefix
	nsPath = strings.TrimPrefix(nsPath, "/")

	// Canonicalize the path to always having a '/' suffix
	if !strings.HasSuffix(nsPath, "/") {
		nsPath += "/"
	}

	return nsPath
}
1146727
func (s *DeleteJobInput) SetBranchName(v string) *DeleteJobInput {
	s.BranchName = &v
	return s
}
868135
func (u *User) CanonicalName() string {
	return C.GoString(C.sp_user_canonical_name(u.sp_user))
}