MCPcopy Create free account
hub / github.com/Driver-C/tryssh / createCaches

Method createCaches

pkg/control/create.go:64–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

62}
63
64func (cc *CreateController) createCaches() bool {
65 var newCache CacheContent
66 if err := json.Unmarshal([]byte(cc.createContent), &newCache); err != nil {
67 utils.Errorln("Cache's JSON unmarshal failed.")
68 return false
69 }
70 cc.configuration.ServerLists = append(cc.configuration.ServerLists,
71 config.ServerListConfig{
72 IP: newCache.IP,
73 Port: newCache.Port,
74 User: newCache.User,
75 Password: newCache.Password,
76 Alias: newCache.Alias,
77 },
78 )
79 return true
80}
81
82// NewCreateController creates a new CreateController for the specified type and content.
83func NewCreateController(createType string, createContent string,

Callers 1

ExecuteCreateMethod · 0.95

Calls 1

ErrorlnFunction · 0.92

Tested by

no test coverage detected