diff options
author | feistel <6742251-feistel@users.noreply.gitlab.com> | 2021-08-19 15:54:20 +0000 |
---|---|---|
committer | feistel <6742251-feistel@users.noreply.gitlab.com> | 2021-08-19 15:54:20 +0000 |
commit | 087c010c476ed6c009b6c94a76a7e9db3b9d3fdd (patch) | |
tree | c68aac4473adea2eae5ead5d49c173f80dac3e8c /internal/config/config.go | |
parent | a83f8b31982222ad64b23a47ee6d092042cf9f1a (diff) | |
download | gitlab-shell-087c010c476ed6c009b6c94a76a7e9db3b9d3fdd.tar.gz |
refactor: move away from ioutil (deprecated)
Diffstat (limited to 'internal/config/config.go')
-rw-r--r-- | internal/config/config.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index f69a6c8..c67f60a 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -2,7 +2,6 @@ package config import ( "errors" - "io/ioutil" "net/url" "os" "path" @@ -147,7 +146,7 @@ func newFromFile(path string) (*Config, error) { *cfg = DefaultConfig cfg.RootDir = filepath.Dir(path) - configBytes, err := ioutil.ReadFile(path) + configBytes, err := os.ReadFile(path) if err != nil { return nil, err } @@ -191,7 +190,7 @@ func parseSecret(cfg *Config) error { cfg.SecretFilePath = path.Join(cfg.RootDir, cfg.SecretFilePath) } - secretFileContent, err := ioutil.ReadFile(cfg.SecretFilePath) + secretFileContent, err := os.ReadFile(cfg.SecretFilePath) if err != nil { return err } |