2023-12-01 09:50:09 +00:00
|
|
|
package client
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
"github.com/1Panel-dev/1Panel/backend/global"
|
|
|
|
)
|
|
|
|
|
2024-01-31 07:08:14 +00:00
|
|
|
func loadParamFromVars(key string, vars map[string]interface{}) string {
|
2023-12-01 09:50:09 +00:00
|
|
|
if _, ok := vars[key]; !ok {
|
2024-02-22 05:42:06 +00:00
|
|
|
if key != "bucket" && key != "port" {
|
2023-12-01 09:50:09 +00:00
|
|
|
global.LOG.Errorf("load param %s from vars failed, err: not exist!", key)
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
2024-01-15 07:57:02 +00:00
|
|
|
|
|
|
|
return fmt.Sprintf("%v", vars[key])
|
2023-12-01 09:50:09 +00:00
|
|
|
}
|