golang-exercise

module
v0.0.0-...-d0adc60 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2024 License: MIT

README

golang-exercise

00. 참고 자료

01.Hello : Hello world

  • go 빌드용 docker 실행
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

99. VScode 설정

  • 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
Go Report Card
  • install
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

Directories

Path Synopsis
04.learn-go-with-tests
02.hello-world command
10.mocking command
18.http-server command
19.json command
20.io command
22.time/cmd/cli command
06.go-rpc
01.helloworld/mock_helloworld
Package mock_helloworld is a generated GoMock package.
Package mock_helloworld is a generated GoMock package.
07.go-cshared
01.goutil command
03.person command
08.go-kit
01.stringsvc1 command
02.stringsvc2 command
03.stringsvc3 command
06.shipping command
07.apigateway command
08.napodate/cmd command
09.gin
01.QuickStart command
02.Router command
03.Parameters command
04.QueryString command
05.Multipart command
06.PostForm command
07.Map command
08.UploadFiles command
11.log command
12.customlog command
13.ModelBinding command
15.BindQuery command
16.ProtoBuf command
17.Serving command
18.Rendering command
20.redirect command
21.middleware command
22.customconfig command
23.Encrypt command
24.multiple command
25.graceful command
26.formdata command
10.go-redis
01.Tutorial command
02.client command
03.blpop command
04.incr command
05.pipeline command
06.pipelined command
07.scan command
08.set command
09.txpipeline command
10.txpipelined command
11.watch command
12.conn command
13.cluster command
14.parseurl command
15.addhook command
16.pubsub command
17.pubsub2 command
18.scancmd command
19.script command
20.custom command
21.redis-rate command
22.fsm command
99.poc command
11.database
01.mariadb command
12.golangbyexample
01.abstract command
02.builder command
03.factory command
04.object command
05.prototype command
06.singleton command
07.chain command
08.command command
09.iterator command
10.mediator command
11.memento command
12.null command
13.observer command
14.state command
15.strategy command
16.template command
17.visitor command
18.adapter command
19.bridge command
20.composite command
21.facade command
22.flyweight command
23.proxy command
24.inherit command
25.polymorphism command
26.abstract command
29.readfiles command
30.writefiles command
31.deletefile command
32.updatefile command
33.genericfile command
34.time command
35.os command
36.array command
37.map command
38.query_params command
39.queue command
40.stack command
41.set command
42.linkedlist command
43.binarysearch command
47.network command
48.logger command
49.channel command
50.goroutine command
51.datatypes command
52.string command
53.math command
54.random command
55.func command
13.golang-examples
02.pipe command
03.aesgcm command
04.bcrypt command
05.in_array command
06.pythagoras command
07.getchar command
08.wait command
09.lifo command
10.regex command
11.fibonacci command
12.prime command
13.numbers command
14.ticker command
15.timeout command
16.json command
17.exec command
18.compress command
19.csv command
20.xml command
21.suicide command
22.pi2go command
23.explorer command
24.cgo command
25.codegen command
26.telnet command
27.httpd command
28.parallel command
29.gocomment command
30.image command
31.sqlite command
32.ppk-crypto command
33.args command
34.cron command
14.synapsoftQuiz

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL