MCPcopy
hub / github.com/nextdns/nextdns / activation

Function activation

activate.go:14–29  ·  view source on GitHub ↗
(args []string)

Source from the content-addressed store, hash-verified

12)
13
14func activation(args []string) error {
15 cmd := args[0]
16 var c config.Config
17 c.Parse("nextdns "+cmd, nil, true)
18 defer func() { _ = c.Save() }()
19 switch cmd {
20 case "activate":
21 c.AutoActivate = true
22 return activate(c)
23 case "deactivate":
24 c.AutoActivate = false
25 return deactivate()
26 default:
27 return fmt.Errorf("%s: unknown command", cmd)
28 }
29}
30
31func listenAddr(listen string) (string, uint16, error) {
32 host, port, err := net.SplitHostPort(listen)

Callers

nothing calls this directly

Calls 5

ParseMethod · 0.95
SaveMethod · 0.95
activateFunction · 0.85
deactivateFunction · 0.85
ErrorfMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…