Install Golang 1.9:
wget https://storage.googleapis.com/golang/go1.9.linux-armv6l.tar.gz
sudo tar -C /usr/local -xzf go1.9.linux-armv6l.tar.gz
export PATH=$PATH:/usr/local/go/bin # put into ~/.profile
If already installed old golang with apt-get:
| package main | |
| import ( | |
| "bufio" | |
| "io/ioutil" | |
| "os/signal" | |
| //"syscall" | |
| "fmt" | |
| "log" | |
| "os" |
| #!/usr/bin/env bash | |
| # Ensure a file name is provided | |
| if [ -z "$1" ] | |
| then | |
| echo "No file name provided. Usage: ./split_file.bash <filename>" | |
| exit 1 | |
| fi | |
| # Extract the directory and base name from the file |
| package main | |
| import ( | |
| "crypto/tls" | |
| "fmt" | |
| "io" | |
| "net/http" | |
| ) | |
| func main() { |
| package main | |
| import ( | |
| "bufio" | |
| "fmt" | |
| "hash/fnv" | |
| "io" | |
| "os" | |
| ) |
| package main | |
| import ( | |
| "crypto/rand" | |
| "crypto/rsa" | |
| "crypto/x509" | |
| "encoding/pem" | |
| "flag" | |
| "fmt" | |
| "io/ioutil" |
| package ciphers | |
| import ( | |
| "crypto/rand" | |
| "crypto/rsa" | |
| "crypto/sha512" | |
| "crypto/x509" | |
| "encoding/pem" | |
| "log" | |
| ) |
| func GetGzip(path string) string { | |
| println(path) | |
| client := &http.Client{ | |
| Transport: &transport.Transport{ | |
| ReadTimeout: 10 * time.Second, | |
| RequestTimeout: 15 * time.Second, | |
| }, | |
| } |
Install Golang 1.9:
wget https://storage.googleapis.com/golang/go1.9.linux-armv6l.tar.gz
sudo tar -C /usr/local -xzf go1.9.linux-armv6l.tar.gz
export PATH=$PATH:/usr/local/go/bin # put into ~/.profile
If already installed old golang with apt-get: