(args []string)
| 12 | ) |
| 13 | |
| 14 | func 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 | |
| 31 | func listenAddr(listen string) (string, uint16, error) { |
| 32 | host, port, err := net.SplitHostPort(listen) |
nothing calls this directly
no test coverage detected
searching dependent graphs…