{"comment":{"url":"https://api.github.com/repos/jmoiron/sqlx/comments/30292678","html_url":"https://github.com/jmoiron/sqlx/commit/5d28545680294b853dab9456d3aab796a50a5984#commitcomment-30292678","id":30292678,"node_id":"MDEzOkNvbW1pdENvbW1lbnQzMDI5MjY3OA==","user":{"login":"davidwkeith","id":97965,"node_id":"MDQ6VXNlcjk3OTY1","avatar_url":"https://avatars2.githubusercontent.com/u/97965?v=4","gravatar_id":"","url":"https://api.github.com/users/davidwkeith","html_url":"https://github.com/davidwkeith","followers_url":"https://api.github.com/users/davidwkeith/followers","following_url":"https://api.github.com/users/davidwkeith/following{/other_user}","gists_url":"https://api.github.com/users/davidwkeith/gists{/gist_id}","starred_url":"https://api.github.com/users/davidwkeith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidwkeith/subscriptions","organizations_url":"https://api.github.com/users/davidwkeith/orgs","repos_url":"https://api.github.com/users/davidwkeith/repos","events_url":"https://api.github.com/users/davidwkeith/events{/privacy}","received_events_url":"https://api.github.com/users/davidwkeith/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":null,"commit_id":"5d28545680294b853dab9456d3aab796a50a5984","created_at":"2018-08-26T20:52:31Z","updated_at":"2018-08-26T20:52:31Z","author_association":"NONE","body":"To check GoLang version during runtime (using semver package, could be done manually if you don't want the dependency)\r\n\r\n```\r\npackage main\r\n\r\nimport (\r\n\t\"fmt\"\r\n\t\"runtime\"\r\n\t\"strings\"\r\n\r\n\t\"github.com/coreos/go-semver/semver\"\r\n)\r\n\r\nfunc main() {\r\n\tgoLangVersion := strings.TrimPrefix(runtime.Version(), \"go\")\r\n\t// handles dot zero releases like \"go1.11\", assumes \"go2.0\"\r\n\tif len(strings.Split(goLangVersion, \".\")) < 3 {\r\n\t\tgoLangVersion += \".0\"\r\n\t}\r\n\tminVersion := semver.New(\"1.8.0\")\r\n\tfmt.Println(semver.New(goLangVersion).LessThan(*minVersion))\r\n}\r\n```"}}
{"actor":{"display_login":"davidwkeith"}}