Skip to content

Commit

Permalink
added function comments
Browse files Browse the repository at this point in the history
  • Loading branch information
wilkermichael committed Sep 21, 2023
1 parent 77ae32b commit 97b4432
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions control-plane/connect-inject/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ const (
KubernetesSuccessReasonMsg = "Kubernetes health checks passing"
)

// GetDefaultConsulNamespace returns the default namespace if the passed namespace
// is empty, otherwise returns back the passed in namespace
func GetDefaultConsulNamespace(ns string) string {
if ns == "" {
ns = DefaultConsulNS
Expand All @@ -63,6 +65,8 @@ func GetDefaultConsulNamespace(ns string) string {
return ns
}

// GetDefaultConsulPartition returns the default partition if the passed partition
// is empty, otherwise returns back the passed in partition
func GetDefaultConsulPartition(ap string) string {
if ap == "" {
ap = DefaultConsulPartition
Expand All @@ -71,6 +75,8 @@ func GetDefaultConsulPartition(ap string) string {
return ap
}

// GetDefaultConsulPeer returns the default peer if the passed peer
// is empty, otherwise returns back the passed in peer
func GetDefaultConsulPeer(peer string) string {
if peer == "" {
peer = DefaultConsulPeer
Expand Down

0 comments on commit 97b4432

Please sign in to comment.