1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-01-26 03:52:12 +02:00

17 lines
394 B
Go
Raw Normal View History

2019-04-12 17:32:10 +08:00
package resolver
import (
"flag"
"fmt"
)
// RegisterTarget will register grpc discovery mock address flag
func RegisterTarget(target *string, discoveryID string) {
flag.CommandLine.StringVar(
target,
fmt.Sprintf("grpc.%s", discoveryID),
fmt.Sprintf("discovery://default/%s", discoveryID),
fmt.Sprintf("App's grpc target.\n example: -grpc.%s=\"127.0.0.1:9090\"", discoveryID),
)
}