GitBucket
4.23.0
Toggle navigation
Sign in
Files
Branches
1
Releases
Issues
Pull requests
Labels
Priorities
Milestones
Wiki
Forks
sample-golang
/
01_hello
Transfer to URL with SHA
19 commits
tree:
b6be082e6b
Switch branches
×
master
01_hello
/
func
/
latest commit
b6be082e6b
yhornisse
authored
on 27 Sep 2021
..
sub
add func and package sample
3 years ago
README.md
add func and package sample
3 years ago
func.go
add func and package sample
3 years ago
go.mod
add func and package sample
3 years ago
README.md
MEMO
引数をstructや配列をそのまま指定すると値渡し、ポインタを指定すれば参照渡しになる
速度を気にするなら参照渡し
パッケージ分ける場合はgo.modとか使うと便利。
go mod init xxxx/xxx
とかで初期化できる。
パッケージでリモートのパスを使う場合
go help importpath
で確認できるようなものが使える(Githubとか)
replaceを定義しておけばローカルでもリモートでもビルドできる。