From 7beb080f4d6c257bcd5b763208b10133b1498f7c Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Thu, 21 Jul 2022 13:33:40 +0200 Subject: [PATCH] fix outdated env error messages --- cmd/saturn-l2/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/saturn-l2/main.go b/cmd/saturn-l2/main.go index 388b415..1368952 100644 --- a/cmd/saturn-l2/main.go +++ b/cmd/saturn-l2/main.go @@ -148,10 +148,10 @@ func mkConfig() (config, error) { // parse FIL address filAddr := os.Getenv(FIL_ADDRESS_VAR) if filAddr == "" { - return config{}, errors.New("No FIL_WALLET_ADDRESS provided. Please set the environment variable.\n") + return config{}, fmt.Errorf("No %s provided. Please set the environment variable.\n", FIL_ADDRESS_VAR) } if _, err := address.NewFromString(filAddr); err != nil { - return config{}, fmt.Errorf("Invalid FIL_WALLET_ADDRESS format: %w", err) + return config{}, fmt.Errorf("Invalid %s format: %w", FIL_ADDRESS_VAR, err) } // parse max disk space @@ -172,7 +172,7 @@ func mkConfig() (config, error) { rootDirStr := os.Getenv(ROOT_DIR_ENV_VAR) if rootDirStr == "" { - return config{}, errors.New("No ROOT_DIR provided. Please set the environment variable.") + return config{}, fmt.Errorf("No %s provided. Please set the environment variable.", ROOT_DIR_ENV_VAR) } return config{