Skip to content

Go Memes

HOA PHAN edited this page Feb 29, 2024 · 8 revisions
//Fixed since Go 1.21 - https://go.dev/blog/loopvar-preview
// docker run --rm -v "$(pwd)":/go/src/app -w /go/src/app golang:1.21   go run l.go
// docker run --rm -v "$(pwd)":/go/src/app -w /go/src/app golang:1.22.0 go run l.go
func main() {
    done := make(chan bool)

    values := []string{"a", "b", "c"}
    for _, v := range values {
        go func() {
            fmt.Println(v) // all 'c'
            done <- true
        }()
    }
    for _ = range values {
        <-done
    }
}
Screenshot 2023-10-21 at 6 49 18 am
docker images --format "{{.Repository}}:{{.Tag}} - {{.Size}}" | awk '{print $NF, $0}' | sort -h
58MB registry.k8s.io/kube-scheduler:v1.29.1 - 58MB
66.5MB registry.k8s.io/kube-proxy:v1.27.2 - 66.5MB
68.3MB registry.k8s.io/kube-proxy:v1.28.2 - 68.3MB
85.4MB registry.k8s.io/kube-proxy:v1.29.1 - 85.4MB
107MB registry.k8s.io/kube-controller-manager:v1.27.2 - 107MB
115MB registry.k8s.io/kube-apiserver:v1.27.2 - 115MB
116MB registry.k8s.io/kube-controller-manager:v1.28.2 - 116MB
118MB registry.k8s.io/kube-controller-manager:v1.29.1 - 118MB
120MB registry.k8s.io/kube-apiserver:v1.28.2 - 120MB
123MB registry.k8s.io/kube-apiserver:v1.29.1 - 123MB
136MB registry.k8s.io/etcd:3.5.10-0 - 136MB
181MB registry.k8s.io/etcd:3.5.7-0 - 181MB
192MB nginx:latest - 192MB
231MB mockserver/mockserver:mockserver-5.12.0 - 231MB
291MB cassandra:3.11.2 - 291MB
398MB hubproxy.docker.internal:5555/docker/desktop-kubernetes:kubernetes-v1.27.2-cni-v1.2.0-critools-v1.27.0-cri-dockerd-v0.3.2-1-debian - 398MB
411MB hubproxy.docker.internal:5555/docker/desktop-kubernetes:kubernetes-v1.28.2-cni-v1.3.0-critools-v1.28.0-cri-dockerd-v0.3.4-1-debian - 411MB
422MB docker/desktop-kubernetes:kubernetes-v1.29.1-cni-v1.4.0-critools-v1.29.0-cri-dockerd-v0.3.8-1-debian - 422MB
482MB openjdk:16 - 482MB
496MB openjdk:19 - 496MB
501MB openjdk:17 - 501MB
517MB openjdk:21 - 517MB
520MB openjdk:8 - 520MB
536MB k8s-fleetman-queue:release1-arm64 - 536MB
645MB openjdk:11 - 645MB
697MB docker.elastic.co/elasticsearch/elasticsearch-oss:6.8.12 - 697MB
790MB openjdk:9 - 790MB
822MB golang:1.21 - 822MB
830MB golang:1.22.0 - 830MB
830MB golang:latest - 830MB
860MB my-go-app:latest - 860MB
919MB openjdk:10 - 919MB
1.1GB node:latest - 1.1GB

eye

Clone this wiki locally