MCPcopy Create free account
hub / github.com/adeljck/PassGet / GetClientConfig

Function GetClientConfig

modules/finalshell/finalshell.go:45–61  ·  view source on GitHub ↗
(Path string)

Source from the content-addressed store, hash-verified

43 return WorkDir
44}
45func GetClientConfig(Path string) *ClientConfig {
46 ConfigFilepath := Path + `\config.json`
47 data, err := os.ReadFile(ConfigFilepath)
48 if err != nil {
49 fmt.Println("读取文件失败:", err)
50 return nil
51 }
52
53 // 解析 JSON
54 var C = new(ClientConfig)
55 err = json.Unmarshal(data, C)
56 if err != nil {
57 log.Println("parse error", err)
58 return nil
59 }
60 return C
61}
62func GetConnDetails(ConnFileList []string) []ServerDetail {
63 ServerDetails := make([]ServerDetail, 0)
64 for _, ConnFile := range ConnFileList {

Callers 1

GetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected