pkg/environment: Migrate fs functions to fsx
This commit is contained in:
parent
45540ab253
commit
5a43ecfaeb
21 changed files with 155 additions and 199 deletions
|
|
@ -19,11 +19,12 @@ type Params struct {
|
|||
// ParamsFromEnv creates a new set of parameters from the environment.
|
||||
// Uses [ReadBaseDirectory] or falls back to [BaseDirectoryDefault].
|
||||
func ParamsFromEnv() (params Params, err error) {
|
||||
var native environment.Environment
|
||||
|
||||
// try to read the base directory!
|
||||
value, err := ReadBaseDirectory(new(environment.Native)) // TODO: Are we sure about the native environment here?
|
||||
value, err := ReadBaseDirectory(native) // TODO: Are we sure about the native environment here?
|
||||
switch {
|
||||
case environment.IsNotExist(err):
|
||||
case os.IsNotExist(err):
|
||||
params.ConfigPath = bootstrap.BaseDirectoryDefault
|
||||
case err == nil:
|
||||
params.ConfigPath = value
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue