From d5d510f7d6c4b89dc1647e81609128bc9290a2b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=80=E5=8F=91=E8=80=85=E5=B0=8F=E8=93=9D?= <540590988@qq.com> Date: Fri, 5 Jul 2019 18:13:04 +0800 Subject: [PATCH] feat: default host name --- pkg/conf/env/env.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/conf/env/env.go b/pkg/conf/env/env.go index 64c4a963a..aea995ab9 100644 --- a/pkg/conf/env/env.go +++ b/pkg/conf/env/env.go @@ -49,7 +49,7 @@ func init() { if Hostname == "" { Hostname, err = os.Hostname() if err != nil { - Hostname = "" + Hostname = Hostname = strconv.Itoa(time.Now().UnixNano()) } } addFlag(flag.CommandLine)