1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-02-09 13:36:57 +02:00

Merge pull request #3 from captainblue2013/patch-1

Patch 1
This commit is contained in:
开发者小蓝 2019-07-05 18:39:43 +08:00 committed by GitHub
commit 70577a1e27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

5
pkg/conf/env/env.go vendored
View File

@ -5,6 +5,8 @@ package env
import (
"flag"
"os"
"strconv"
"time"
)
// deploy env.
@ -49,10 +51,9 @@ func init() {
if Hostname == "" {
Hostname, err = os.Hostname()
if err != nil {
Hostname = ""
Hostname = strconv.Itoa(int(time.Now().UnixNano()))
}
}
addFlag(flag.CommandLine)
}