Skip to content

Instantly share code, notes, and snippets.

View jasmingacic's full-sized avatar

Jasmin Gacic jasmingacic

  • Sarajevo, Bosnia and Herzegovina
View GitHub Profile
package main
import (
"fmt"
"sync"
)
func worker(message string, wg *sync.WaitGroup) {
defer wg.Done()
fmt.Printf("Shoot the message: %s\n", message)
package main
import (
"fmt"
)
func worker(message string, c chan string) {
c <- fmt.Sprintf("Shoot the message: %s\n", message)
}
# go run main.go
Shoot the message: go 'routinely'
Shoot the message: or not
Shoot the message: sometimes
# go run main.go
Shoot the message: go 'routinely'
Shoot the message: sometimes
Shoot the message: or not
package main
import (
"fmt"
)
func worker(message string, c chan string) {
c <- fmt.Sprintf("Shoot the message: %s\n", message)
}
# go run main.go
working hard!!!
# go run main.go
working hard!!!
# go run main.go
working hard!!!
Shoot the message: go 'routinely'
package main
import (
"fmt"
"time"
)
func worker(message string) {
fmt.Printf("Shoot the message: %s\n", message)
}
diff --git a/Makefile b/Makefile
index f974470..c2f7ea9 100644
--- a/Makefile
+++ b/Makefile
@@ -156,7 +156,7 @@ docker-build: ## Build docker image with the manager.
--tag kubeshop/kusk-gateway:$(shell git describe --tags $(shell git rev-list --tags --max-count=1)) \
--file ./build/manager/Dockerfile \
.
- minikube image --profile kgw load kubeshop/kusk-gateway:$(shell git describe --tags $(shell git rev-list --tags --max-count=1))
+ # minikube image --profile kgw load kubeshop/kusk-gateway:$(shell git describe --tags $(shell git rev-list --tags --max-count=1))