feat: support baggage propagation in httpc (#2375)
* feat: support baggage propagation in httpc * chore: use go 1.16 * chore: use go 1.16 * chore: use go ^1.16 * chore: remove deprecated
This commit is contained in:
6
tools/goctl/pkg/env/env.go
vendored
6
tools/goctl/pkg/env/env.go
vendored
@@ -2,8 +2,8 @@ package env
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
@@ -94,7 +94,7 @@ func GetOr(key, def string) string {
|
||||
|
||||
func readEnv(goctlHome string) *sortedmap.SortedMap {
|
||||
envFile := filepath.Join(goctlHome, envFileDir)
|
||||
data, err := ioutil.ReadFile(envFile)
|
||||
data, err := os.ReadFile(envFile)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
@@ -143,5 +143,5 @@ func WriteEnv(kv []string) error {
|
||||
return err
|
||||
}
|
||||
envFile := filepath.Join(defaultGoctlHome, envFileDir)
|
||||
return ioutil.WriteFile(envFile, []byte(strings.Join(goctlEnv.Format(), "\n")), 0o777)
|
||||
return os.WriteFile(envFile, []byte(strings.Join(goctlEnv.Format(), "\n")), 0o777)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user