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

Method IsExist

core/utils/controller/manager/snap.go:13–19  ·  view source on GitHub ↗
(serviceName string)

Source from the content-addressed store, hash-verified

11}
12
13func (s *Snap) IsExist(serviceName string) bool {
14 out, err := run(nil, s.toolCmd, "services")
15 if err != nil {
16 return false
17 }
18 return strings.Contains(out, serviceName)
19}
20
21func (s *Snap) IsActive(serviceName string) bool {
22 out, err := run(nil, s.toolCmd, "services")

Callers 1

OperateMethod · 0.95

Calls 1

runFunction · 0.70

Tested by

no test coverage detected