Commit fd1e042 1 parent 45c9623 commit fd1e042 Copy full SHA for fd1e042
File tree 2 files changed +6
-17
lines changed
2 files changed +6
-17
lines changed Original file line number Diff line number Diff line change @@ -85,8 +85,8 @@ api-docs: gen-crd-api-reference-docs
85
85
86
86
# Run go mod tidy
87
87
tidy :
88
- cd api; rm -f go.sum; go mod tidy -compat=1.19
89
- rm -f go.sum; go mod tidy -compat=1.19
88
+ cd api; rm -f go.sum; go mod tidy -compat=1.20
89
+ rm -f go.sum; go mod tidy -compat=1.20
90
90
91
91
# Run go fmt against code
92
92
fmt :
Original file line number Diff line number Diff line change @@ -30,10 +30,7 @@ import (
30
30
// given chartutil.Values.
31
31
func ValuesChecksum (values map [string ]interface {}) string {
32
32
newValues := copyValues (values )
33
- var (
34
- s []byte
35
- err error
36
- )
33
+ var s []byte
37
34
38
35
if len (newValues ) != 0 {
39
36
// cleanUpInterfaceMap
@@ -44,10 +41,7 @@ func ValuesChecksum(values map[string]interface{}) string {
44
41
// Sort
45
42
SortMapSlice (msValues )
46
43
// Marshal
47
- s , err = goyaml .Marshal (msValues )
48
- if err != nil {
49
- panic (err )
50
- }
44
+ s , _ = goyaml .Marshal (msValues )
51
45
}
52
46
// Gethash
53
47
return fmt .Sprintf ("%x" , sha1 .Sum (s ))
@@ -76,10 +70,8 @@ func cleanUpMapValue(v interface{}) interface{} {
76
70
return cleanUpInterfaceArray (v )
77
71
case map [interface {}]interface {}:
78
72
return cleanUpInterfaceMap (v )
79
- case string :
80
- return v
81
73
default :
82
- return fmt . Sprintf ( "%v" , v )
74
+ return v
83
75
}
84
76
}
85
77
@@ -101,10 +93,7 @@ func cleanUpInterfaceArray(in []interface{}) []interface{} {
101
93
102
94
func copyValues (in map [string ]interface {}) map [string ]interface {} {
103
95
// Marshal
104
- coppiedValues , err := goyaml .Marshal (in )
105
- if err != nil {
106
- panic (err )
107
- }
96
+ coppiedValues , _ := goyaml .Marshal (in )
108
97
// Unmarshal
109
98
newValues := make (map [string ]interface {})
110
99
goyaml .Unmarshal (coppiedValues , newValues )
You can’t perform that action at this time.
0 commit comments