88 RemoteResourceVersionAnnotation = "ydb.tech/remote-resource-version"
99 ConfigurationChecksum = "ydb.tech/configuration-checksum"
1010 RemoteFinalizerKey = "ydb.tech/remote-finalizer"
11- LastAppliedAnnotation = "ydb.tech/last-applied"
11+ LastApplied = "ydb.tech/last-applied"
1212)
1313
1414func GetYdbTechAnnotations (annotations map [string ]string ) map [string ]string {
@@ -23,31 +23,13 @@ func GetYdbTechAnnotations(annotations map[string]string) map[string]string {
2323
2424func GetLastAppliedAnnotation (annotations map [string ]string ) string {
2525 for key , value := range annotations {
26- if key == LastAppliedAnnotation {
26+ if key == LastApplied {
2727 return value
2828 }
2929 }
3030 return ""
3131}
3232
33- func CompareMaps (map1 , map2 map [string ]string ) bool {
34- if len (map1 ) != len (map2 ) {
35- return false
36- }
37- for key1 , value1 := range map1 {
38- if value2 , ok := map2 [key1 ]; ! ok || value2 != value1 {
39- return false
40- }
41- }
42- return true
43- }
44-
45- func CompareYdbTechAnnotations (map1 , map2 map [string ]string ) bool {
46- map1 = GetYdbTechAnnotations (map1 )
47- map2 = GetYdbTechAnnotations (map2 )
48- return CompareMaps (map1 , map2 )
49- }
50-
5133func CompareLastAppliedAnnotation (map1 , map2 map [string ]string ) bool {
5234 value1 := GetLastAppliedAnnotation (map1 )
5335 value2 := GetLastAppliedAnnotation (map2 )
0 commit comments