transfer_middleware/until/env.go

23 lines
329 B
Go

package until
import (
"fmt"
"os"
)
func GetConfig() string {
var dir string
pwd, _ := os.Getwd()
path := fmt.Sprintf("%s%s", pwd, "/../../env")
bytes, _ := os.ReadFile(path)
switch string(bytes) {
case "produce":
dir = "produce.yaml"
case "test":
dir = "test.yaml"
default:
dir = "local.yaml"
}
return dir
}