⚙️ Add ability to build from Dockerfiles directly

This commit is contained in:
Ettore Di Giacinto
2022-04-26 19:24:31 +02:00
committed by mudler
parent 4e2a2adfc1
commit e70a543f42
457 changed files with 33148 additions and 4999 deletions

View File

@@ -65,7 +65,7 @@ v := ComplexStruct{
},
}
hash, err := hashstructure.Hash(v, nil)
hash, err := hashstructure.Hash(v, hashstructure.FormatV2, nil)
if err != nil {
panic(err)
}

View File

@@ -31,10 +31,10 @@ type HashOptions struct {
// Default is false (in which case the tag is used instead)
SlicesAsSets bool
// UseStringer will attempt to use fmt.Stringer aways. If the struct
// UseStringer will attempt to use fmt.Stringer always. If the struct
// doesn't implement fmt.Stringer, it'll fall back to trying usual tricks.
// If this is true, and the "string" tag is also set, the tag takes
// precedense (meaning that if the type doesn't implement fmt.Stringer, we
// precedence (meaning that if the type doesn't implement fmt.Stringer, we
// panic)
UseStringer bool
}
@@ -323,8 +323,7 @@ func (w *walker) visit(v reflect.Value, opts *visitOpts) (uint64, error) {
}
if w.ignorezerovalue {
zeroVal := reflect.Zero(reflect.TypeOf(innerV.Interface())).Interface()
if innerV.Interface() == zeroVal {
if innerV.IsZero() {
continue
}
}