Fix dumping ActionConfig structure (#2029)

This commit is contained in:
rivengh 2021-12-11 23:07:17 +01:00 • committed by GitHub
parent 8323f2f100
commit 05e3eed893
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -60,8 +60,9 @@ type ActionConfig struct {
func (a ActionConfig) String() string {
var s []string
for k, v := range structs.Map(a) {
if v != nil && !reflect.ValueOf(v).IsNil() {
s = append(s, fmt.Sprintf("%s:%v", k, v))
val := reflect.ValueOf(v)
if v != nil && !val.IsNil() {
s = append(s, fmt.Sprintf("%s:%v", k, val.Elem()))
}
}
return strings.Join(s, ", ")