mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-28 22:45:26 +08:00
Related to #39095 https://go.dev/doc/modules/version-numbers Update pkg version according to golang dep version convention --------- Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
28 lines
484 B
Go
28 lines
484 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
"sort"
|
|
|
|
"github.com/spf13/viper"
|
|
"go.uber.org/zap"
|
|
|
|
"github.com/milvus-io/milvus/pkg/v2/log"
|
|
)
|
|
|
|
func ShowYaml(filepath string) {
|
|
reader := viper.New()
|
|
reader.SetConfigFile(filepath)
|
|
if err := reader.ReadInConfig(); err != nil {
|
|
log.Warn("read config failed", zap.Error(err))
|
|
os.Exit(-3)
|
|
}
|
|
keys := reader.AllKeys()
|
|
sort.Strings(keys)
|
|
for _, key := range keys {
|
|
v := reader.GetString(key)
|
|
fmt.Fprintln(os.Stdout, key, "=", v)
|
|
}
|
|
}
|