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