System: Debian/Ubuntu/Fedora. Might work for others as well.
As mentioned here, to update a go version you will first need to uninstall the original version.
To uninstall, delete the /usr/local/go directory by:
| // thanks to: | |
| // https://github.com/uber-go/zap/blob/master/FAQ.md#does-zap-support-log-rotation | |
| // https://studygolang.com/articles/17394 | |
| // https://stackoverflow.com/questions/54395407/zap-logging-with-1-customized-config-and-2-lumberjack | |
| // Please test and debug it before putting it in production. | |
| package logger | |
| import ( | |
| "fmt" | |
| "os" |
| package main | |
| import ( | |
| "crypto/aes" | |
| "crypto/cipher" | |
| "crypto/rand" | |
| "crypto/sha256" | |
| "encoding/hex" | |
| "fmt" | |
| "strings" |
| package main | |
| import ( | |
| "bytes" | |
| "crypto/aes" | |
| "crypto/cipher" | |
| "crypto/rand" | |
| "crypto/sha256" | |
| "encoding/base64" | |
| "errors" |
| package main | |
| import ( | |
| "bytes" | |
| "crypto/aes" | |
| "crypto/cipher" | |
| "encoding/base64" | |
| "fmt" | |
| ) |
System: Debian/Ubuntu/Fedora. Might work for others as well.
As mentioned here, to update a go version you will first need to uninstall the original version.
To uninstall, delete the /usr/local/go directory by: