()
| 11 | var log = golog.LoggerFor("example") |
| 12 | |
| 13 | func main() { |
| 14 | helperFullPath := "sysproxy-cmd" |
| 15 | iconFullPath, _ := filepath.Abs("./icon.png") |
| 16 | log.Debugf("Using icon at %v", iconFullPath) |
| 17 | err := sysproxy.EnsureHelperToolPresent(helperFullPath, "Input your password and save the world!", iconFullPath) |
| 18 | if err != nil { |
| 19 | fmt.Printf("Error EnsureHelperToolPresent: %s\n", err) |
| 20 | return |
| 21 | } |
| 22 | off, err := sysproxy.On("localhost:12345") |
| 23 | if err != nil { |
| 24 | fmt.Printf("Error set proxy: %s\n", err) |
| 25 | return |
| 26 | } |
| 27 | fmt.Println("proxy set, hit enter to continue (or kill the parent process)...") |
| 28 | var i int |
| 29 | fmt.Scanf("%d\n", &i) |
| 30 | off() |
| 31 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…