I hereby claim:
- I am comtom on github.
- I am comtom (https://keybase.io/comtom) on keybase.
- I have a public key whose fingerprint is 131E 694F 783E B32F 7AA2 D216 19EE 87EA E285 F732
To claim this, I am signing this object:
| import "golang.org/x/sync/errgroup" | |
| ... | |
| g, ctx := errgroup.WithContext(ctx) | |
| complete := make(chan []Store, len(locations)) | |
| for _, location := range locations { | |
| g.Go(fetchStores(ctx, store.Id, complete)) | |
| } | |
| if err := g.Wait(); err != nil { | |
| log.Errorf("%s", err) |
| func worker(done chan bool) { | |
| fmt.Print("working...") | |
| time.Sleep(time.Second) | |
| fmt.Println("done") | |
| done <- true | |
| } | |
| func main() { | |
| done := make(chan bool, 1) | |
| go worker(done) |
| package main | |
| import "fmt" |
| func sum(nums ...int) { | |
| fmt.Print(nums, " ") | |
| total := 0 | |
| for _, num := range nums { | |
| total += num | |
| } | |
| fmt.Println(total) | |
| } | |
| func main() { | |
| sum(1, 2) |
| go func(msg string) { | |
| fmt.Println(msg) | |
| }("going") |
| var firstVar interface{} | |
| firstVar = "this is a string" | |
| firstString, ok := firstVar.(string) | |
| if (!ok) { | |
| fmt.Printf("firstString is not a string, do something about it! Value:'%v'\n", firstString) | |
| } |
| func f1(arg int) (int, error) { | |
| if arg == 42 { | |
| return -1, errors.New("can't work with 42") | |
| } | |
| return arg + 3, nil | |
| } | |
| if rresult, err := f1(i); err != nil { | |
| fmt.Println("f1 failed:", err) | |
| } |
I hereby claim:
To claim this, I am signing this object:
| FROM alpine:3.7 | |
| ENV KUBE_VERSION="v1.11.2" | |
| ENV ANSIBLE_VERSION="2.5.0" | |
| ENV TERRAFORM_VERSION="0.11.8" | |
| # install kubectl | |
| RUN set -ex \ | |
| && apk add --update ca-certificates \ | |
| && apk add --update -t deps curl \ |
| FROM alpine:3.2 | |
| RUN apk add --update ca-certificates && \ | |
| apk add libc6-compat && \ | |
| rm -rf /var/cache/apk/* /tmp/* | |
| ADD micro /micro | |
| WORKDIR / | |
| ENTRYPOINT [ "/micro" ] |