go mod init <modulename>
go get -u ./...
go mod vendor
go get -u <repo url>
go mod vendor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"encoding/json" | |
"fmt" | |
"log" | |
"os" | |
"strings" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"io/ioutil" | |
"log" | |
"os" | |
"path/filepath" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include .env | |
PROJECTNAME=$(shell basename "$(PWD)") | |
# Go related variables. | |
GOBASE=$(shell pwd) | |
GOPATH=$(GOBASE)/vendor:$(GOBASE):/home/azer/code/golang # You can remove or change the path after last colon. | |
GOBIN=$(GOBASE)/bin | |
GOFILES=$(wildcard *.go) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os" | |
"os/signal" | |
"syscall" | |
"golang.org/x/crypto/ssh/terminal" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"fmt" | |
"log" | |
"net/http" | |
"sync" | |
"time" | |
) |
Specifications (I am just listing critical components):
OS: MacOS High Sierra 10.13.6
Intel i7-8086k (or i7-8700k)
64GB DDR4 3200 RAM - G.Skill Trident Z
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"math/big" | |
) | |
func factorial(n *big.Int) (result *big.Int) { | |
result = big.NewInt(1) | |
var one big.Int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"sort" | |
"time" | |
"github.com/fatih/color" | |
) |
I hereby claim:
- I am montanaflynn on github.
- I am anonfunction (https://keybase.io/anonfunction) on keybase.
- I have a public key ASDJ7jbNBlgbTot_HP-YBGppD9JHv0Mt0yV7jxoTTUE3Zwo
To claim this, I am signing this object: