From caafd973e4ce9faace2c232afb70bfb6c6de349b Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Wed, 9 Jun 2021 14:03:09 +0300 Subject: [PATCH] [#598] misc: Remove global prefixes New config package in storage node does not use application prefix from misc package. Therefore inner ring node can define prefix in local scope. Signed-off-by: Alex Vanin --- cmd/neofs-ir/defaults.go | 5 +++-- misc/build.go | 8 -------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/cmd/neofs-ir/defaults.go b/cmd/neofs-ir/defaults.go index 98aef6818..bd2625933 100644 --- a/cmd/neofs-ir/defaults.go +++ b/cmd/neofs-ir/defaults.go @@ -4,17 +4,18 @@ import ( "strings" "time" - "github.com/nspcc-dev/neofs-node/misc" "github.com/spf13/viper" ) func newConfig(path string) (*viper.Viper, error) { + const innerRingPrefix = "neofs_ir" + var ( err error v = viper.New() ) - v.SetEnvPrefix(misc.InnerRingPrefix) + v.SetEnvPrefix(innerRingPrefix) v.AutomaticEnv() v.SetEnvKeyReplacer(strings.NewReplacer(".", "_")) diff --git a/misc/build.go b/misc/build.go index 16a4bc986..198c4a433 100644 --- a/misc/build.go +++ b/misc/build.go @@ -1,13 +1,5 @@ package misc -const ( - // Prefix is a neofs node application prefix. - Prefix = "neofs" - - // InnerRingPrefix is an inner ring application prefix. - InnerRingPrefix = "neofs_ir" -) - // These variables are changed in compile time. var ( // Build is an application build time.