golang-exercise
00. 참고 자료
01.Hello : Hello world
docker run --rm --privileged \
-v $PWD:/go/ \
-v /var/run/docker.sock:/var/run/docker.sock \
-it --name golang golang:latest /bin/bash
- go 소스를 하나씩 빌드하면 파일명으로 실행 파일 생성
go build hello.go
./hello
- Remote Containers 에 접속할 때의 설정 정보는 아래 폴더에 기록됨
/Users/<user>/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-containers/imageConfigs/
Refer
git clone https://github.com/jdegre/5GC_APIs;
docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli generate -i /local/TS29122_NIDD.yaml -g go -o /local/out/go/t8-client
docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli generate -i /local/TS29122_NIDD.yaml -g go-server -o /local/out/go/t8-server
docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli generate -i /local/TS29122_NIDD.yaml -g go-gin-server -o /local/out/go/t8-gin-server
docker run --rm --privileged \
-v $PWD/out/go/t8-server:/go/src/ \
-v /var/run/docker.sock:/var/run/docker.sock \
-it --name t8-server golang-grpc /bin/bash
mkdir -p /go/src/github.com/GIT_USER_ID/GIT_REPO_ID/
ln -s /go/src/go /go/src/github.com/GIT_USER_ID/GIT_REPO_ID/go
CID=`docker ps -f name=t8-server -q`
GEN_IP=`docker inspect --format '{{.NetworkSettings.IPAddress}}' ${CID}`
export GEN_IP=172.17.0.3
curl -i -s -v -X GET --header 'Content-Type: application/json' --header 'Accept: application/json' \
-d '{"scsAsId": "scsAsId001"}' \
http://${GEN_IP}:8080/3gpp-nidd/v1/scsAsId001/configurations
docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli generate -i /local/TS29522_NIDDConfigurationTrigger.yaml -g go -o /local/out/go/niddconf-client
docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli generate -i /local/TS29522_NIDDConfigurationTrigger.yaml -g go-server -o /local/out/go/niddconf-server
docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli generate -i /local/TS29522_NIDDConfigurationTrigger.yaml -g go-gin-server -o /local/out/go/niddconf-gin-server
docker run --rm -v $PWD:/local \
-v /var/run/docker.sock:/var/run/docker.sock \
-it --name openapi-generator-cli openapitools/openapi-generator-cli /bin/bash
cd /opt/openapi-generator/modules/openapi-generator-cli/target/; java -jar openapi-generator-cli.jar version
wget https://github.com/stevenchiu30801/free5gc-nssf/raw/master/openapi/openapi-generator-cli.jar
mv openapi-generator-cli.jar openapi-generator-cli-4.0.0-SNAPSHOT.jar
java -jar openapi-generator-cli-4.0.0-SNAPSHOT.jar version
git clone https://github.com/OpenAPITools/openapi-generator
docker build -t openapi-generator-cli -f Dockerfile .
git clone https://github.com/openapitools/openapi-generator
cd openapi-generator
./run-in-docker.sh mvn package
- Finite State Machine for go
go get github.com/gojp/goreportcard
cd $GOPATH/src/github.com/gojp/goreportcard
make install
go get github.com/gojp/goreportcard/cmd/goreportcard-cli
goreportcard-cli -v