MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / structToMap

Function structToMap

agent/app/service/agents_utils.go:1504–1514  ·  view source on GitHub ↗
(value interface{})

Source from the content-addressed store, hash-verified

1502}
1503
1504func structToMap(value interface{}) (map[string]interface{}, error) {
1505 payload, err := json.Marshal(value)
1506 if err != nil {
1507 return nil, err
1508 }
1509 result := map[string]interface{}{}
1510 if err := json.Unmarshal(payload, &result); err != nil {
1511 return nil, err
1512 }
1513 return result, nil
1514}
1515
1516func readInstallEnv(envStr string) map[string]interface{} {
1517 if strings.TrimSpace(envStr) == "" {

Callers 2

writeOpenclawConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected