Skip to content

Commit

Permalink
perf: 优化名称后缀 7 位字符
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeEirc committed Aug 15, 2023
1 parent b29e46b commit 1031947
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ default name rule:

func getDefaultName() string {
hostname, _ := os.Hostname()
hostname = fmt.Sprintf("%s-%s", hostname, common.UUID())
hostname = fmt.Sprintf("%s-%s", hostname, common.RandomStr(7))
if serverHostname, ok := os.LookupEnv(hostEnvKey); ok {
hostname = fmt.Sprintf("%s-%s", serverHostname, hostname)
}
Expand Down

0 comments on commit 1031947

Please sign in to comment.