Skip to content

Instantly share code, notes, and snippets.

@ihcsim
Last active February 1, 2022 21:56
Show Gist options
  • Save ihcsim/179d6f92aa467a2585b97a20112fb9d2 to your computer and use it in GitHub Desktop.
Save ihcsim/179d6f92aa467a2585b97a20112fb9d2 to your computer and use it in GitHub Desktop.
type Service struct {
name string
namespace string
}
func main() {
svc1 := Service{
name: "nginx",
namespace: "default",
}
svc2 := Service{
name: "haproxy",
namespace: svc1.namespace,
}
fmt.Printf("%+v\n%+v\n", svc1, svc2)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment