mirror of
https://github.com/docker/cli.git
synced 2026-11-01 23:35:23 +03:00
cli/command/formatter: modernize
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -24,7 +24,7 @@ func MarshalJSON(x any) ([]byte, error) {
|
||||
// marshalMap marshals x to map[string]any
|
||||
func marshalMap(x any) (map[string]any, error) {
|
||||
val := reflect.ValueOf(x)
|
||||
if val.Kind() != reflect.Ptr {
|
||||
if val.Kind() != reflect.Pointer {
|
||||
return nil, fmt.Errorf("expected a pointer to a struct, got %v", val.Kind())
|
||||
}
|
||||
if val.IsNil() {
|
||||
|
||||
Reference in New Issue
Block a user