{"id":19202328,"url":"https://github.com/osamingo/golang-gin-example","last_synced_at":"2025-02-23T05:42:34.181Z","repository":{"id":20732166,"uuid":"24016380","full_name":"osamingo/golang-gin-example","owner":"osamingo","description":"Example: Gin Web Framework","archived":false,"fork":false,"pushed_at":"2014-09-14T08:42:02.000Z","size":1000,"stargazers_count":1,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-05-01T13:38:09.523Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/osamingo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-14T07:45:03.000Z","updated_at":"2024-05-01T13:38:09.524Z","dependencies_parsed_at":"2022-09-11T03:40:23.393Z","dependency_job_id":null,"html_url":"https://github.com/osamingo/golang-gin-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osamingo%2Fgolang-gin-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osamingo%2Fgolang-gin-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osamingo%2Fgolang-gin-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osamingo%2Fgolang-gin-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/osamingo","download_url":"https://codeload.github.com/osamingo/golang-gin-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240275899,"owners_count":19775614,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T12:42:13.253Z","updated_at":"2025-02-23T05:42:34.135Z","avatar_url":"https://github.com/osamingo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"golang-gin-example\n===\n\n## Install Go\n\n`Go`をインストールする。\n\n```sh\n$ brew update\n$ brew install go --cross-compile-all\n```\n\n`launchctl`に登録する。\n\n```\n# /etc/launchd.conf\nsetenv GOROOT /usr/local/Cellar/go/1.3.1/libexec\nsetenv GOPATH $HOME/.go\n```\n\n```\n$ launchctl \u003c /etc/launchd.conf\n```\n\n## Run golang-gin-example\n\nパッケージマネージャに[goop](https://github.com/nitrous-io/goop)を使用しているので、インストールする。\n\n```\n$ go get github.com/nitrous-io/goop\n```\n\n対象のリポジトリをクローンする。\n\n```\n$ git clone git@github.com:osamingo/golang-gin-example.git\n```\n\nディレクトリを移動して、依存関係を解決する。  \n`goop`コマンドが見つからない場合は、`$GOPATH/bin/goop`とかに存在するので`PATH`を通す。\n\n```\n$ cd golang-gin-example\n$ goop install\n```\n\n`go run`で動かす。\n\n```\n$ goop go run src/main.go\n```\n\n起動後、`http://localhost:8080/ping`に繋がるか確認できればOKです。\n\n## Install IntelliJ IDEA \u0026 Golang plugin\n\n### IntelliJ IDEA\n\nDL site: [IntelliJ IDEA - The Best Java and Polyglot IDE](http://www.jetbrains.com/idea/)\n\n上記のサイトから、通常通りインストールする。\n\n### Install Golang plugin\n\nEAP DL site: [@dlsniper's dropbox](https://www.dropbox.com/sh/kzcmavr2cmqqdqw/j8wjp8SdNH) (@via/  [go-lang-plugin-org/go-lang-idea-plugin](https://github.com/go-lang-plugin-org/go-lang-idea-plugin))\n\n最新版のプラグインを使用したいので、作者のDropboxからEAPの`jar`をDLする。\n\n![install-plugin-from-jar](https://raw.githubusercontent.com/osamingo/golang-gin-example/master/img/install-plugin-from-jar.png)\n\n上記のハイライトしているボタンを押下してインストールする。\n\n## Start IntelliJ IDEA\n\nコマンドラインから起動しないと、何故か`GOROOT`を見てくれないので、`open`コマンドで起動する。\n\n```\n$ open /Applications/IntelliJ\\ IDEA\\ 13\\ CE.app\n```\n\n起動後、`Import Project...`からプロジェクトをインポートする。\n\n![import-project-one](https://raw.githubusercontent.com/osamingo/golang-gin-example/master/img/import-project-one.png)\n\n![import-project-two](https://raw.githubusercontent.com/osamingo/golang-gin-example/master/img/import-project-two.png)\n\n![import-project-three](https://raw.githubusercontent.com/osamingo/golang-gin-example/master/img/import-project-three.png)\n\nインポート後、`Shift + Command + A`で、`Find Action`を起動させる。\n\n![edit-configurations](https://raw.githubusercontent.com/osamingo/golang-gin-example/master/img/edit-configurations.png)\n\n`.vendor`に`GOPATH`を通す。\n\n![edit-configurations-detail](https://raw.githubusercontent.com/osamingo/golang-gin-example/master/img/edit-configuration-detail.png)\n\n`main.go`を右クリックし、起動させる。\n\n![run-main](https://raw.githubusercontent.com/osamingo/golang-gin-example/master/img/run-main.png)\n\n起動後、`http://localhost:8080/ping`に繋がるか確認できればOKです。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosamingo%2Fgolang-gin-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosamingo%2Fgolang-gin-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosamingo%2Fgolang-gin-example/lists"}