go-switch
Switching between Go version with ease
➜ ~ go-switch list
go1.13.15
go1.15
go1.16
go1.16.13
module zicarecoding | |
go 1.18 |
#!/bin/sh | |
# Docker-compose check if mysql connection is ready | |
# https://stackoverflow.com/a/51641089 | |
maxcounter=30 | |
counter=1 | |
while ! mysql -u"$MYSQL_USER" -p"$MYSQL_PASSWORD" -h"0.0.0.0" -P"3306" -e "SHOW DATABASES;" > /dev/null 2>&1; do | |
sleep 1 | |
counter=`expr $counter + 1` | |
if [ $counter -gt $maxcounter ]; then |
go-switch
Switching between Go version with ease
➜ ~ go-switch list
go1.13.15
go1.15
go1.16
go1.16.13
Proxy servers are not the holy grail of internet surfing, that this video makes them out to be. There are drawbacks, too. | |
1) Proxy servers will speed up the retrieval of requests that you make -- but only if those requests were already made, and are in the proxy's cache. Otherwise, your request will be slower (even if you do not notice), because you are involving yet another computer to be a middle-man for a request that could be done directly, without the proxy. | |
Also know that your own computer has cache, that does the same thing. The advantage of using a proxy, is that if anyone else (that also uses the same proxy) has visited a site, and you visit the same site, then you will reap the benefit of using the proxy's cache for a faster response. But to be clear... if you both visit amazon, and you shop for different things, the cache will not help (only slight help, for data in common, like amazon specific logos, etc). | |
2) Your IP address is hidden, and it is not hidden. It depends on how much you trust |
package main | |
import ( | |
"log" | |
"time" | |
) | |
const ( | |
NUMBER_OF_JOBS = 25 | |
NUMBER_OF_WORKERS = 2 |
LOAD_TEST_ENV=env $$(cat .env.testing | xargs) | |
GOTEST=go test | |
GOTEST_PATH=./internal/usecase/... | |
GOCOVER=go tool cover | |
coverage: | |
$(LOAD_TEST_ENV) \ | |
$(GOTEST) -tags=unit -coverprofile=cover.out $(GOTEST_PATH) | |
$(GOCOVER) -html=cover.out && unlink cover.out |