mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-12-15 17:29:00 +08:00
19 lines
360 B
Go
19 lines
360 B
Go
package client
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/1Panel-dev/1Panel/agent/global"
|
|
)
|
|
|
|
func loadParamFromVars(key string, vars map[string]interface{}) string {
|
|
if _, ok := vars[key]; !ok {
|
|
if key != "bucket" && key != "port" {
|
|
global.LOG.Errorf("load param %s from vars failed, err: not exist!", key)
|
|
}
|
|
return ""
|
|
}
|
|
|
|
return fmt.Sprintf("%v", vars[key])
|
|
}
|