Skip to content

Commit f65499c

Browse files
fiksnstippi2
andcommitted
Better naming
Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
1 parent c4afdc6 commit f65499c

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

replicate/common/common.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func CopyAnnotations[I, O Annotatable](input I, output O) {
5656
strip, ok := val[StripAnnotations]
5757
if !ok || strings.ToLower(strip) != "true" {
5858
for k, v := range val {
59-
if strings.HasPrefix(k, Prefix) {
59+
if strings.HasPrefix(k, ReplicatorPrefix) {
6060
continue
6161
}
6262
copy[k] = v

replicate/common/consts.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@ package common
22

33
// Annotations that are used to control this Controller's behaviour
44
const (
5-
Prefix = "replicator.v1.mittwald.de"
5+
ReplicatorPrefix = "replicator.v1.mittwald.de"
66
)
77

88
var (
9-
ReplicateFromAnnotation = Prefix + "/replicate-from"
10-
ReplicatedAtAnnotation = Prefix + "/replicated-at"
11-
ReplicatedFromVersionAnnotation = Prefix + "/replicated-from-version"
12-
ReplicatedKeysAnnotation = Prefix + "/replicated-keys"
13-
ReplicationAllowed = Prefix + "/replication-allowed"
14-
ReplicationAllowedNamespaces = Prefix + "/replication-allowed-namespaces"
15-
ReplicateTo = Prefix + "/replicate-to"
16-
ReplicateToMatching = Prefix + "/replicate-to-matching"
17-
KeepOwnerReferences = Prefix + "/keep-owner-references"
18-
StripLabels = Prefix + "/strip-labels"
19-
StripAnnotations = Prefix + "/strip-annotations"
9+
ReplicateFromAnnotation = ReplicatorPrefix + "/replicate-from"
10+
ReplicatedAtAnnotation = ReplicatorPrefix + "/replicated-at"
11+
ReplicatedFromVersionAnnotation = ReplicatorPrefix + "/replicated-from-version"
12+
ReplicatedKeysAnnotation = ReplicatorPrefix + "/replicated-keys"
13+
ReplicationAllowed = ReplicatorPrefix + "/replication-allowed"
14+
ReplicationAllowedNamespaces = ReplicatorPrefix + "/replication-allowed-namespaces"
15+
ReplicateTo = ReplicatorPrefix + "/replicate-to"
16+
ReplicateToMatching = ReplicatorPrefix + "/replicate-to-matching"
17+
KeepOwnerReferences = ReplicatorPrefix + "/keep-owner-references"
18+
StripLabels = ReplicatorPrefix + "/strip-labels"
19+
StripAnnotations = ReplicatorPrefix + "/strip-annotations"
2020
)

0 commit comments

Comments
 (0)