good morning!!!!

Skip to content
Snippets Groups Projects
Commit 765a4b93 authored by Ferran Borreguero's avatar Ferran Borreguero
Browse files

Add default values

parent a22a68cd
No related branches found
No related tags found
No related merge requests found
......@@ -41,9 +41,10 @@ func (d *DebugCommand) Flags() *flagset.Flagset {
flags := d.NewFlagSet("debug")
flags.Uint64Flag(&flagset.Uint64Flag{
Name: "seconds",
Usage: "seconds to trace",
Value: &d.seconds,
Name: "seconds",
Usage: "seconds to trace",
Value: &d.seconds,
Default: 5,
})
flags.StringFlag(&flagset.StringFlag{
Name: "output",
......
......@@ -97,17 +97,15 @@ func (m *Meta2) NewFlagSet(n string) *flagset.Flagset {
f := flagset.NewFlagSet(n)
f.StringFlag(&flagset.StringFlag{
Name: "address",
Value: &m.addr,
Usage: "Address of the grpc endpoint",
Name: "address",
Value: &m.addr,
Usage: "Address of the grpc endpoint",
Default: "127.0.0.1:3131",
})
return f
}
func (m *Meta2) Conn() (*grpc.ClientConn, error) {
if m.addr == "" {
m.addr = "127.0.0.1:3131"
}
conn, err := grpc.Dial(m.addr, grpc.WithInsecure())
if err != nil {
return nil, fmt.Errorf("failed to connect to server: %v", err)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment