$ docker build -t {my_tag_name} --build-arg SSH_KEY="`cat ~/.ssh/id_rsa`" --no-cache .
$ docker image ls
package main | |
import "sort" | |
type Event struct { | |
pos int | |
eType int // 1 for start, -1 for end | |
} | |
type SortEvent []Event |
package main | |
import ( | |
"fmt" | |
"golang.org/x/tour/tree" | |
) | |
// Walk walks the tree t sending all values | |
// from the tree to the channel ch. | |
func Walk(t *tree.Tree, ch chan int) { |
package main | |
import ( | |
"golang.org/x/tour/pic" | |
"image" | |
"image/color" | |
) | |
type Image struct{ | |
w int |
package main | |
import ( | |
"io" | |
"os" | |
"strings" | |
) | |
type rot13Reader struct { | |
r io.Reader |
package main | |
import "golang.org/x/tour/reader" | |
type MyReader struct{} | |
func (MyReader) Read(b []byte) (int, error) { | |
for i := 0; i < len(b); i++ { | |
b[i] = 'A' | |
} |
package main | |
import ( | |
"fmt" | |
) | |
type ErrNegativeSqrt float64 | |
func (e ErrNegativeSqrt) Error() string { | |
return fmt.Sprintf("cannot Sqrt negative number: %v", float64(e)) |
package main | |
import ( | |
"fmt" | |
) | |
func Sqrt(x float64) (z float64) { | |
z = x | |
for i := 0; i < 10; i++ { | |
z -= (z*z - x) / (2*z) |
package main | |
import ( | |
"golang.org/x/tour/wc" | |
"strings" | |
) | |
func WordCount(s string) (m map[string]int) { | |
m = make(map[string]int) | |
ws := strings.Fields(s) |
package main | |
import "fmt" | |
type IPAddr [4]byte | |
// TODO: Add a "String() string" method to IPAddr. | |
func (a IPAddr) String() string { | |
return fmt.Sprintf("%d.%d.%d.%d", a[0], a[1], a[2], a[3]) |