mirror of
https://github.com/go-kratos/kratos.git
synced 2025-03-17 21:07:54 +02:00
feat: default host name
This commit is contained in:
parent
3233dc9fec
commit
d5d510f7d6
2
pkg/conf/env/env.go
vendored
2
pkg/conf/env/env.go
vendored
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user