【環境構築】golangのバージョン管理にasdfを使ってみた
バージョン管理ツールを言語毎に入れるのがわずらわしいのでasdfというバージョン管理ツールを導入するることにした。
参考資料
バージョン管理ツール asdf でディレクトリごとにPythonのバージョンを指定する
asdfインストール
$ brew install asdf
asdfに含まれるプラグイン一覧を表示
$ asdf plugin list all initializing plugin repository...Cloning into '/Users/username/.asdf/repository'... warning: templates not found in :userprofile/.git-templates/git-secrets remote: Enumerating objects: 3585, done. remote: Counting objects: 100% (779/779), done. remote: Compressing objects: 100% (541/541), done. remote: Total 3585 (delta 456), reused 479 (delta 234), pack-reused 2806 Receiving objects: 100% (3585/3585), 815.43 KiB | 1.52 MiB/s, done. Resolving deltas: 100% (1818/1818), done. 1password-cli https://github.com/NeoHsu/asdf-1password-cli.git R https://github.com/asdf-community/asdf-r.git act https://github.com/grimoh/asdf-act.git action-validator https://github.com/mpalmer/action-validator.git adr-tools https://gitlab.com/td7x/asdf/adr-tools.git ag https://github.com/koketani/asdf-ag.git age https://github.com/threkk/asdf-age aks-engine https://github.com/robsonpeixoto/asdf-aks-engine.git alias https://github.com/andrewthauer/asdf-alias.git allure https://github.com/comdotlinux/asdf-allure.git alp https://github.com/asdf-community/asdf-alp.git ansible-base https://github.com/amrox/asdf-pyapp.git ant https://github.com/jackboespflug/asdf-ant.git argo https://github.com/sudermanjr/asdf-argo.git argo-rollouts https://github.com/abatilo/asdf-argo-rollouts.git argocd https://github.com/beardix/asdf-argocd.git aria2 https://github.com/asdf-community/asdf-aria2.git asciidoctorj https://github.com/gliwka/asdf-asciidoctorj.git aws-copilot https://github.com/NeoHsu/asdf-copilot aws-iam-authenticator https://github.com/stefansedich/asdf-aws-iam-authenticator.git aws-nuke https://github.com/bersalazar/asdf-aws-nuke.git aws-sam-cli https://github.com/amrox/asdf-pyapp.git aws-vault https://github.com/karancode/asdf-aws-vault.git awscli https://github.com/MetricMike/asdf-awscli.git awsebcli https://github.com/amrox/asdf-pyapp.git babashka https://github.com/fredZen/asdf-babashka bashbot https://github.com/mathew-fleisch/asdf-bashbot.git bat https://gitlab.com/wt0f/asdf-bat.git batect https://github.com/johnlayton/asdf-batect.git bats https://github.com/timgluz/asdf-bats.git bazel https://github.com/rajatvig/asdf-bazel.git binnacle https://github.com/Traackr/asdf-binnacle.git bitwarden https://github.com/vixus0/asdf-bitwarden.git bombardier https://github.com/NeoHsu/asdf-bombardier.git bosh https://github.com/laidbackware/asdf-github-release-downloader.git boundary https://github.com/Banno/asdf-hashicorp.git brig https://github.com/Ibotta/asdf-brig.git btrace https://github.com/joschi/asdf-btrace.git buf https://github.com/truepay/asdf-buf.git buildpack https://github.com/johnlayton/asdf-buildpack.git bundler https://github.com/jonathanmorley/asdf-bundler.git caddy https://github.com/salasrod/asdf-caddy.git carthage https://github.com/younke/asdf-carthage.git ccache https://github.com/asdf-community/asdf-ccache.git cf https://github.com/mattysweeps/asdf-cf.git cfssl https://github.com/mathew-fleisch/asdf-cfssl.git chamber https://github.com/mintel/asdf-chamber cheat https://github.com/jmoratilla/asdf-cheat-plugin chezmoi https://github.com/joke/asdf-chezmoi.git chezscheme https://github.com/asdf-community/asdf-chezscheme.git chicken https://github.com/evhan/asdf-chicken.git clojure https://github.com/halcyon/asdf-clojure.git cloudflared https://github.com/threkk/asdf-cloudflared cloudsql-proxy https://github.com/itspngu/asdf-cloudsql-proxy.git clusterctl https://github.com/pfnet-research/asdf-clusterctl.git cmake https://github.com/srivathsanmurali/asdf-cmake.git cmctl https://github.com/asdf-community/asdf-cmctl.git cockroach https://github.com/salasrod/asdf-cockroach.git codefresh https://github.com/gurukulkarni/asdf-codefresh.git conan https://github.com/amrox/asdf-pyapp.git concourse https://github.com/mattysweeps/asdf-concourse.git conduit https://github.com/gmcabrita/asdf-conduit.git conform https://github.com/skyzyx/asdf-conform.git conftest https://github.com/looztra/asdf-conftest.git consul https://github.com/Banno/asdf-hashicorp.git container-diff https://github.com/cgroschupp/asdf-container-diff.git cookiecutter https://github.com/shawon-crosen/asdf-cookiecutter.git copper https://github.com/vladlosev/asdf-copper.git coq https://github.com/gingerhot/asdf-coq.git cosign https://gitlab.com/wt0f/asdf-cosign.git crc https://github.com/sqtran/asdf-crc.git credhub https://github.com/laidbackware/asdf-github-release-downloader.git crossplane-cli https://github.com/joke/asdf-crossplane-cli.git crystal https://github.com/asdf-community/asdf-crystal.git ctlptl https://github.com/ezcater/asdf-ctlptl.git ctop https://github.com/NeoHsu/asdf-ctop.git cue https://github.com/asdf-community/asdf-cue.git dart https://github.com/PatOConnor43/asdf-dart.git dasel https://github.com/asdf-community/asdf-dasel.git dbmate https://github.com/juusujanar/asdf-dbmate.git deck https://github.com/nutellinoit/asdf-deck.git delta https://github.com/andweeb/asdf-delta.git deno https://github.com/asdf-community/asdf-deno.git dep https://github.com/paxosglobal/asdf-dep.git desk https://github.com/endorama/asdf-desk.git devspace https://github.com/NeoHsu/asdf-devspace.git dhall https://github.com/aaaaninja/asdf-dhall.git digdag https://github.com/jtakakura/asdf-digdag.git direnv https://github.com/asdf-community/asdf-direnv.git dive https://github.com/looztra/asdf-dive.git djinni https://github.com/cross-language-cpp/asdf-djinni.git dmd https://github.com/sylph01/asdf-dmd.git docker-compose-v1 https://github.com/kompiro/asdf-docker-compose-v1 docker-slim https://github.com/everpeace/asdf-docker-slim.git dockle https://github.com/mathew-fleisch/asdf-dockle.git doctl https://github.com/maristgeek/asdf-doctl.git doctoolchain https://github.com/joschi/asdf-doctoolchain docuum https://github.com/bradym/asdf-docuum.git dome https://github.com/jtakakura/asdf-dome.git dotenv-linter https://github.com/wesleimp/asdf-dotenv-linter.git dotnet-core https://github.com/emersonsoares/asdf-dotnet-core.git dotty https://github.com/vic/asdf-dotty.git draft https://github.com/kristoflemmens/asdf-draft.git driftctl https://github.com/nlamirault/asdf-driftctl.git duf https://github.com/NeoHsu/asdf-duf.git dust https://github.com/looztra/asdf-dust.git dyff https://gitlab.com/wt0f/asdf-dyff.git editorconfig-checker https://github.com/gabitchov/asdf-editorconfig-checker.git ejson https://github.com/cipherstash/asdf-ejson.git eksctl https://github.com/elementalvoid/asdf-eksctl.git elasticsearch https://github.com/asdf-community/asdf-elasticsearch.git elixir https://github.com/asdf-vm/asdf-elixir.git elm https://github.com/asdf-community/asdf-elm.git embulk https://github.com/yuokada/asdf-embulk.git emsdk https://github.com/RobLoach/asdf-emsdk.git erlang https://github.com/asdf-vm/asdf-erlang.git esy https://github.com/asdf-community/asdf-esy.git etcd https://github.com/particledecay/asdf-etcd.git exa https://github.com/nyrst/asdf-exa.git fd https://gitlab.com/wt0f/asdf-fd.git figma-export https://github.com/younke/asdf-figma-export.git firebase https://github.com/jthegedus/asdf-firebase.git flutter https://github.com/oae/asdf-flutter.git flux2 https://github.com/tablexi/asdf-flux2.git fluxctl https://github.com/stefansedich/asdf-fluxctl.git fly https://github.com/laidbackware/asdf-github-release-downloader.git fzf https://github.com/kompiro/asdf-fzf.git gauche https://github.com/sakuro/asdf-gauche.git gcloud https://github.com/jthegedus/asdf-gcloud.git getenvoy https://github.com/asdf-community/asdf-getenvoy.git ghidra https://github.com/Honeypot95/asdf-ghidra.git ghq https://github.com/kajisha/asdf-ghq.git ginkgo https://github.com/jimmidyson/asdf-ginkgo.git git https://gitlab.com/jcaigitlab/asdf-git.git git-chglog https://github.com/GoodwayGroup/asdf-git-chglog.git github-cli https://github.com/bartlomiejdanek/asdf-github-cli.git github-markdown-toc https://github.com/skyzyx/asdf-github-markdown-toc.git gitui https://github.com/looztra/asdf-gitui.git glab https://github.com/particledecay/asdf-glab.git gleam https://github.com/vic/asdf-gleam.git go-containerregistry https://github.com/dex4er/asdf-go-containerregistry.git go-getter https://github.com/ryodocx/asdf-go-getter.git go-jira https://github.com/dguihal/asdf-go-jira.git go-jsonnet https://gitlab.com/craigfurman/asdf-go-jsonnet.git go-sdk https://github.com/yacchi/asdf-go-sdk.git gohugo https://github.com/nklmilojevic/asdf-hugo.git gojq https://github.com/jimmidyson/asdf-gojq.git golang https://github.com/kennyp/asdf-golang.git golangci-lint https://github.com/hypnoglow/asdf-golangci-lint.git gomigrate https://github.com/joschi/asdf-gomigrate.git gomplate https://github.com/sneakybeaky/asdf-gomplate.git gopass https://github.com/trallnag/asdf-gopass.git goreleaser https://github.com/kforsthoevel/asdf-goreleaser.git goss https://github.com/raimon49/asdf-goss.git graalvm https://github.com/vic/asdf-graalvm.git gradle https://github.com/rfrancis/asdf-gradle.git gradle-profiler https://github.com/joschi/asdf-gradle-profiler.git grails https://github.com/weibemoura/asdf-grails.git grain https://github.com/cometkim/asdf-grain.git groovy https://github.com/weibemoura/asdf-groovy.git grpc-health-probe https://github.com/zufardhiyaulhaq/asdf-grpc-health-probe.git grpcurl https://github.com/asdf-community/asdf-grpcurl.git grype https://github.com/poikilotherm/asdf-grype.git guile https://github.com/indiebrain/asdf-guile.git gwvault https://github.com/GoodwayGroup/asdf-gwvault.git hadolint https://github.com/looztra/asdf-hadolint.git hamler https://github.com/scudelletti/asdf-hamler.git has https://github.com/sylvainmetayer/asdf-has haskell https://github.com/vic/asdf-haskell.git hasura-cli https://github.com/gurukulkarni/asdf-hasura.git haxe https://github.com/asdf-community/asdf-haxe.git helm https://github.com/Antiarchitect/asdf-helm.git helm-cr https://github.com/Antiarchitect/asdf-helm-cr.git helm-ct https://github.com/tablexi/asdf-helm-ct.git helm-diff https://github.com/dex4er/asdf-helm-diff.git helm-docs https://github.com/sudermanjr/asdf-helm-docs.git helmfile https://github.com/feniix/asdf-helmfile.git helmsman https://github.com/luisdavim/asdf-helmsman hey https://github.com/raimon49/asdf-hey.git httpie-go https://github.com/abatilo/asdf-httpie-go.git hub https://github.com/vixus0/asdf-hub.git hugo https://github.com/NeoHsu/asdf-hugo.git hygen https://github.com/brentjanderson/asdf-hygen.git idris https://github.com/vic/asdf-idris.git idris2 https://github.com/asdf-community/asdf-idris2.git imagemagick https://github.com/mangalakader/asdf-imagemagick.git imgpkg https://github.com/vmware-tanzu/asdf-carvel.git inlets https://github.com/nlamirault/asdf-inlets.git io https://github.com/mracos/asdf-io.git istioctl https://github.com/virtualstaticvoid/asdf-istioctl.git janet https://github.com/Jakski/asdf-janet.git java https://github.com/halcyon/asdf-java.git jb https://github.com/beardix/asdf-jb.git jbang https://github.com/joschi/asdf-jbang.git jib https://github.com/joschi/asdf-jib.git jmespath https://github.com/skyzyx/asdf-jmespath.git jmeter https://github.com/comdotlinux/asdf-jmeter jq https://github.com/azmcode/asdf-jq.git jreleaser https://github.com/joschi/asdf-jreleaser.git jsonnet https://github.com/Banno/asdf-jsonnet.git julia https://github.com/rkyleg/asdf-julia.git just https://github.com/ggilmore/asdf-just.git jx https://github.com/vbehar/asdf-jx.git k3d https://github.com/spencergilbert/asdf-k3d.git k3sup https://github.com/cgroschupp/asdf-k3sup.git k6 https://github.com/grimoh/asdf-k6.git k9s https://github.com/looztra/asdf-k9s.git kapp https://github.com/vmware-tanzu/asdf-carvel.git kbld https://github.com/vmware-tanzu/asdf-carvel.git kconf https://github.com/particledecay/asdf-kconf.git ki https://github.com/comdotlinux/asdf-ki kind https://github.com/johnlayton/asdf-kind.git kn https://github.com/joke/asdf-kn.git ko https://github.com/zasdaym/asdf-ko.git kompose https://github.com/technikhil314/asdf-kompose.git kops https://github.com/Antiarchitect/asdf-kops.git kotlin https://github.com/asdf-community/asdf-kotlin.git kpt https://github.com/nlamirault/asdf-kpt.git krew https://github.com/jimmidyson/asdf-krew.git kscript https://github.com/edgelevel/asdf-kscript.git ksonnet https://github.com/Banno/asdf-ksonnet.git ktlint https://github.com/esensar/asdf-ktlint.git kube-capacity https://github.com/looztra/asdf-kube-capacity.git kube-code-generator https://github.com/jimmidyson/asdf-kube-code-generator.git kube-controller-tools https://github.com/jimmidyson/asdf-kube-controller-tools.git kubebuilder https://github.com/virtualstaticvoid/asdf-kubebuilder.git kubectl https://github.com/Banno/asdf-kubectl.git kubectl-bindrole https://github.com/looztra/asdf-kubectl-bindrole.git kubectx https://gitlab.com/wt0f/asdf-kubectx.git kubefedctl https://github.com/kvokka/asdf-kubefedctl.git kubemqctl https://github.com/johnlayton/asdf-kubemqctl.git kubergrunt https://github.com/NeoHsu/asdf-kubergrunt.git kubeseal https://github.com/stefansedich/asdf-kubeseal.git kubesec https://github.com/vitalis/asdf-kubesec.git kubespy https://github.com/jfreeland/asdf-kubespy.git kubeval https://github.com/stefansedich/asdf-kubeval.git kubie https://github.com/johnhamelink/asdf-kubie.git kustomize https://github.com/Banno/asdf-kustomize.git kuttl https://github.com/jimmidyson/asdf-kuttl.git kwt https://github.com/vmware-tanzu/asdf-carvel.git lab https://github.com/particledecay/asdf-lab.git lazygit https://github.com/nklmilojevic/asdf-lazygit.git lean https://github.com/asdf-community/asdf-lean.git leiningen https://github.com/miorimmax/asdf-lein.git levant https://github.com/spencergilbert/asdf-levant.git lfe https://github.com/vic/asdf-lfe.git linkerd https://github.com/vaynerx/asdf-linkerd.git litestream https://github.com/threkk/asdf-litestream logtalk https://github.com/LogtalkDotOrg/asdf-logtalk.git loki-logcli https://github.com/comdotlinux/asdf-loki-logcli.git lua https://github.com/Stratus3D/asdf-lua.git luaJIT https://github.com/smashedtoatoms/asdf-luaJIT.git lucy https://github.com/cometkim/asdf-lucy.git mage https://github.com/mathew-fleisch/asdf-mage.git make https://github.com/yacchi/asdf-make.git mark https://github.com/jfreeland/asdf-mark.git maven https://github.com/halcyon/asdf-maven.git mc https://github.com/penpyt/asdf-mc.git mdbook https://github.com/cipherstash/asdf-mdbook.git mdbook-linkcheck https://github.com/cipherstash/asdf-mdbook-linkcheck.git meson https://github.com/asdf-community/asdf-meson.git micronaut https://github.com/weibemoura/asdf-micronaut.git mill https://github.com/vic/asdf-mill.git minikube https://github.com/alvarobp/asdf-minikube.git minio https://github.com/aeons/asdf-minio.git minishift https://github.com/sqtran/asdf-minishift.git mint https://github.com/mint-lang/asdf-mint mitmproxy https://github.com/NeoHsu/asdf-mitmproxy.git mkcert https://github.com/salasrod/asdf-mkcert.git mlton https://github.com/asdf-community/asdf-mlton.git mockery https://github.com/cabify/asdf-mockery.git mongo-tools https://github.com/itspngu/asdf-mongo-tools.git mongodb https://github.com/sylph01/asdf-mongodb.git mongosh https://github.com/itspngu/asdf-mongosh.git mvnd https://github.com/joschi/asdf-mvnd.git mysql https://github.com/iroddis/asdf-mysql.git nano https://github.com/mfakane/asdf-nano.git neko https://github.com/asdf-community/asdf-neko.git neovim https://github.com/richin13/asdf-neovim.git newrelic-cli https://github.com/NeoHsu/asdf-newrelic-cli.git nim https://github.com/asdf-community/asdf-nim.git ninja https://github.com/asdf-community/asdf-ninja.git nodejs https://github.com/asdf-vm/asdf-nodejs.git nomad https://github.com/Banno/asdf-hashicorp.git nova https://github.com/elementalvoid/asdf-nova.git nuclei https://github.com/correkthorse/asdf-nuclei.git oc https://github.com/sqtran/asdf-oc.git ocaml https://github.com/asdf-community/asdf-ocaml.git okteto https://github.com/BradenM/asdf-okteto om https://github.com/laidbackware/asdf-github-release-downloader.git opa https://github.com/tochukwuvictor/asdf-opa.git opam https://github.com/asdf-community/asdf-opam.git openresty https://github.com/smashedtoatoms/asdf-openresty.git operator-sdk https://github.com/Medium/asdf-operator-sdk.git osm https://github.com/nlamirault/asdf-osm.git pachctl https://github.com/abatilo/asdf-pachctl.git packer https://github.com/Banno/asdf-hashicorp.git peco https://github.com/asdf-community/asdf-peco.git perl https://github.com/ouest/asdf-perl.git php https://github.com/asdf-community/asdf-php.git pivnet https://github.com/laidbackware/asdf-github-release-downloader.git please https://github.com/asdf-community/asdf-please.git pluto https://github.com/FairwindsOps/asdf-pluto.git pnpm https://github.com/jonathanmorley/asdf-pnpm.git poetry https://github.com/asdf-community/asdf-poetry.git polaris https://github.com/particledecay/asdf-polaris.git popeye https://github.com/nlamirault/asdf-popeye.git postgres https://github.com/smashedtoatoms/asdf-postgres.git pre-commit https://github.com/jonathanmorley/asdf-pre-commit.git protoc https://github.com/paxosglobal/asdf-protoc.git pulumi https://github.com/canha/asdf-pulumi.git purescript https://github.com/nsaunders/asdf-purescript.git purty https://github.com/nsaunders/asdf-purty.git python https://github.com/danhper/asdf-python.git rabbitmq https://github.com/w-sanches/asdf-rabbitmq.git racket https://github.com/vic/asdf-racket.git rancher https://github.com/abinet/asdf-rancher.git rbac-lookup https://github.com/looztra/asdf-rbac-lookup.git rclone https://github.com/johnlayton/asdf-rclone.git rebar https://github.com/Stratus3D/asdf-rebar.git redis https://github.com/smashedtoatoms/asdf-redis.git redis-cli https://github.com/NeoHsu/asdf-redis-cli.git redskyctl https://github.com/sudermanjr/asdf-redskyctl.git reg https://github.com/looztra/asdf-reg.git riak https://github.com/smashedtoatoms/asdf-riak.git richgo https://github.com/paxosglobal/asdf-richgo.git riff https://github.com/abinet/asdf-riff.git ripgrep https://gitlab.com/wt0f/asdf-ripgrep.git rke https://github.com/particledecay/asdf-rke.git rlwrap https://github.com/asdf-community/asdf-rlwrap.git ruby https://github.com/asdf-vm/asdf-ruby.git rust https://github.com/code-lever/asdf-rust.git saml2aws https://github.com/elementalvoid/asdf-saml2aws.git sbcl https://github.com/smashedtoatoms/asdf-sbcl.git sbt https://github.com/bram2000/asdf-sbt.git scala https://github.com/mtatheonly/asdf-scala.git scaleway-cli https://github.com/webofmars/asdf-plugin-scaleway-cli.git scenery https://github.com/skyzyx/asdf-scenery.git semgrep https://github.com/brentjanderson/asdf-semgrep.git semver https://github.com/mathew-fleisch/asdf-semver.git sentinel https://github.com/Banno/asdf-hashicorp.git serf https://github.com/Banno/asdf-hashicorp.git shellcheck https://github.com/luizm/asdf-shellcheck.git shellspec https://github.com/poikilotherm/asdf-shellspec.git shfmt https://github.com/luizm/asdf-shfmt.git sinker https://github.com/elementalvoid/asdf-sinker.git skaffold https://github.com/nklmilojevic/asdf-skaffold.git sloth https://github.com/slok/asdf-sloth.git smlnj https://github.com/samontea/asdf-smlnj.git snyk https://github.com/nirfuchs/asdf-snyk.git solidity https://github.com/diegodorado/asdf-solidity.git sops https://github.com/feniix/asdf-sops.git sopstool https://github.com/elementalvoid/asdf-sopstool.git sourcery https://github.com/younke/asdf-sourcery.git spago https://github.com/nsaunders/asdf-spago.git spark https://github.com/joshuaballoch/asdf-spark.git spin https://github.com/pavloos/asdf-spin.git spring-boot https://github.com/joschi/asdf-spring-boot.git spruce https://github.com/woneill/asdf-spruce.git sqlite https://github.com/cLupus/asdf-sqlite.git stack https://github.com/sestrella/asdf-stack.git starboard https://github.com/zufardhiyaulhaq/asdf-starboard.git starport https://github.com/nikever/asdf-starport.git starship https://github.com/grimoh/asdf-starship.git stern https://github.com/looztra/asdf-stern.git swift https://github.com/fcrespo82/asdf-swift.git swiftformat https://github.com/younke/asdf-swiftformat.git swiftgen https://github.com/younke/asdf-swiftgen.git swiftlint https://github.com/klundberg/asdf-swiftlint.git swiprolog https://github.com/mracos/asdf-swiprolog.git syft https://github.com/davidgp1701/asdf-syft.git syncher https://github.com/nwillc/syncher.git talos https://github.com/particledecay/asdf-talos.git tanka https://github.com/trotttrotttrott/asdf-tanka.git task https://github.com/particledecay/asdf-task.git tekton-cli https://github.com/johnhamelink/asdf-tekton-cli.git terraform https://github.com/Banno/asdf-hashicorp.git terraform-docs https://github.com/looztra/asdf-terraform-docs.git terraform-ls https://github.com/shihanng/asdf-terraform-ls terraform-lsp https://github.com/bartlomiejdanek/terraform-lsp.git terraform-validator https://github.com/looztra/asdf-terraform-validator.git terragrunt https://github.com/ohmer/asdf-terragrunt.git tfenv https://github.com/carlduevel/asdf-tfenv.git tflint https://github.com/skyzyx/asdf-tflint.git tfsec https://github.com/woneill/asdf-tfsec.git tfupdate https://github.com/yuokada/asdf-tfupdate.git thrift https://github.com/alisaifee/asdf-thrift.git tilt https://github.com/eaceaser/asdf-tilt.git tmux https://github.com/aphecetche/asdf-tmux.git tokei https://github.com/gasuketsu/asdf-tokei.git trdsql https://github.com/johnlayton/asdf-trdsql.git tridentctl https://github.com/asdf-community/asdf-tridentctl.git trivy https://github.com/zufardhiyaulhaq/asdf-trivy.git upx https://github.com/jimmidyson/asdf-upx.git usql https://github.com/itspngu/asdf-usql.git v https://github.com/ndac-todoroki/asdf-v.git vals https://github.com/dex4er/asdf-vals.git vault https://github.com/Banno/asdf-hashicorp.git vcluster https://gitlab.com/wt0f/asdf-vcluster.git velero https://github.com/looztra/asdf-velero.git vendir https://github.com/vmware-tanzu/asdf-carvel.git viddy https://github.com/ryodocx/asdf-viddy.git vim https://github.com/tsuyoshicho/asdf-vim.git wasi-sdk https://github.com/coolreader18/asdf-wasi-sdk.git watchexec https://github.com/nyrst/asdf-watchexec.git waypoint https://github.com/Banno/asdf-hashicorp.git websocat https://github.com/bdellegrazie/asdf-websocat.git wren-cli https://github.com/jtakakura/asdf-wren-cli.git wtfutil https://github.com/NeoHsu/asdf-wtfutil.git xcodegen https://github.com/younke/asdf-xcodegen.git xh https://github.com/NeoHsu/asdf-xh yadm https://github.com/particledecay/asdf-yadm.git yarn https://github.com/twuni/asdf-yarn.git yj https://github.com/ryodocx/asdf-yj.git yq https://github.com/sudermanjr/asdf-yq.git ytt https://github.com/vmware-tanzu/asdf-carvel.git zephyr https://github.com/nsaunders/asdf-zephyr.git zig https://github.com/cheetah/asdf-zig.git zola https://github.com/salasrod/asdf-zola.git zoxide https://github.com/nyrst/asdf-zoxide
# golang プラグインをインストール $ asdf plugin add golang
# 使用可能な golang のバージョン一覧を取得する $ asdf list all golang
# バージョンを指定してインストール # asdf install golang <バージョン> $ asdf install golang 1.15.7 # 以下のメッセージが見れたら成功 verifying checksum /Users/User1/.asdf/downloads/golang/1.15.7/archive.tar.gz: OK checksum verified
#goのバージョンを1.15.7に変更 $ asdf local golang 1.15.7 #goのバージョンを確認 $ go version go version go1.15.7 darwin/amd64
Macの設定の変更。おすすめコマンド集
ファインダーに絶対パスを表示
$ defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
ウィンドウのアニメーションを無効化
$ defaults write com.apple.finder AnimateWindowZoom -bool false
Macで端っこまでスクロールさせた時に跳ねるエフェクトを無効化
$ defaults write -g NSAutomaticWindowAnimationsEnabled -bool false
メニューバーの自動非表示の遅延を変更
$ defaults write com.apple.dock autohide-delay -float 0
隠れたDockの表示速度を高速化する
$ defaults write com.apple.dock autohide-time-modifier -float 0
$ defaults write com.apple.dock position-immutable -bool true
「Dockを自動的に隠す」という設定を変更不可にする。
defaults write com.apple.dock autohide-immutable -bool true
元に戻す
defaults delete com.apple.dock autohide-immutable $ killall Dock
$ defaults write com.apple.dock expose-animation-duration -float 0.1
$ defaults write com.apple.dock workspaces-edge-delay -float 0.2
$ defaults write com.apple.dock springboard-show-duration -int 0
$ defaults write com.apple.dock springboard-hide-duration -int 0
$ defaults write com.apple.screencapture disable-shadow -bool true
$ killall SystemUIServer
$ defaults write com.apple.helpviewer DevMode -bool true
$ defaults write com.apple.finder FinderSounds -bool no
$ defaults write com.apple.finder AppleShowAllFiles true
設定を反映させるためのコマンド
$ killall SystemUIServer
マウスポインタの移動スピードをあげるコマンド
$ defaults write "Apple Global Domain" com.apple.mouse.scaling 3
隠れたDockの表示速度を高速化する
$ defaults write com.apple.dock autohide-time-modifier -int 0; killall Dock
springboot ドメイン層の役割
ドメイン層の役割
ドメイン層は、 アプリケーション層に提供する業務ロジックを実装するためのレイヤとなる。
ドメイン層の実装は、以下3つに分かれる。
1.Entityの実装
業務データを保持するためのクラス(Entityクラス)を作成する。
2.Repositoryの実装
業務データを操作するためのメソッドを実装し、Serviceクラスに提供する。 業務データを操作するためのメソッドとは、具体的には、Entityオブジェクトに対するCRUD操作となる。
3.Serviceの実装
業務ロジックを実行するためのメソッドを実装し、アプリケーション層に提供する。 業務ロジック内で必要となる業務データは、Repositoryを介して、Entityオブジェクトとして取得する。
参考url
4.1. ドメイン層の実装 — TERASOLUNA Global Framework Development Guideline 1.0.0.publicreview documentation
210329 JavaSe8 silver 学習p242〜p253(問1〜問20)
問8復習
配列で存在しない要素に対してアクセスしようとした場合に 例外処理を実行する
public class Main { public static void main(String[] args) { String[] array = {"A", "B", "C"}; System.out.println(array[3]); } }
public class Main { public static void main(String[] args) { try { String[] array = {"A", "B", "C"}; System.out.println(array[3]); } catch (ArrayIndexOutOfBoundsException e) { System.out.println("要素が存在しません"); } } }
学習:Javaのテストコード(JUnit5)
JUnit5でテストコードを書く
package jp.co.sample; import static.org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.Test; public class StringUtilsTest { //テスト名 @Test void isEmpty01() { //引数がnullの場合、trueが返却されることを確認する assertTrue(StringUtils.isEmpty(null)); } @Test void isEmpty02() { //引数が空文字の場合、trueが返却されることを確認する assertTrue(StringUtils.isEmpty("")); } @Test void isEmpty03() { //引数が任意の文字列の場合、falseが返却されることを確認する assertTrue(StringUtils.isEmpty("test")); } }