$ systemctl stop apt-daily.timer
$ systemctl disable apt-daily.timer
$ systemctl mask apt-daily.service
$ systemctl daemon-reload
check current status
| package main | |
| import ( | |
| "net/http" | |
| "encoding/json" | |
| ) | |
| type Person struct { | |
| ID int `json:"id"` | |
| Firstname string `json:"firstname"` |
| /* | |
| Watch out, os.IsExist(err) != !os.IsNotExist(err) | |
| They are error checkers, so use them only when err != nil, and you want to handle | |
| specific errors in a different way! | |
| Their main purpose is to wrap around OS error messages for you, so you don't have to test | |
| for Windows/Unix/Mobile/other OS error messages for "file exists/directory exists" and | |
| "file does not exist/directory does not exist" |
| package main | |
| /* | |
| URL: https://github.com/mccoyst/myip/blob/master/myip.go | |
| URL: http://changsijay.com/2013/07/28/golang-get-ip-address/ | |
| */ | |
| import ( | |
| "net" | |
| "os" |