Skip to content

Instantly share code, notes, and snippets.

@CMGS
Created September 24, 2014 02:53
Show Gist options
  • Save CMGS/ab2c84e6aaec9947cea3 to your computer and use it in GitHub Desktop.
Save CMGS/ab2c84e6aaec9947cea3 to your computer and use it in GitHub Desktop.
dynamic set
f := func(opts docker.PushImageOptions, auth docker.AuthConfiguration) error { return nil }
f1 := client.PushImage
v1 := reflect.ValueOf(&(f1)).Elem()
v := reflect.ValueOf(f)
v1.Set(v)
log.Println(client.PushImage(docker.PushImageOptions{}, docker.AuthConfiguration{}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment