{"id":17196743,"url":"https://github.com/weppos/gomotion2015","last_synced_at":"2025-03-25T08:15:34.888Z","repository":{"id":29399018,"uuid":"32934318","full_name":"weppos/gomotion2015","owner":"weppos","description":"A practical introduction to go","archived":false,"fork":false,"pushed_at":"2015-03-28T13:23:31.000Z","size":132,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-30T07:30:13.659Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://speakerdeck.com/weppos/practical-introduction-to-golang-codemotion-rome-2015","language":"Go","has_issues":false,"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/weppos.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":"2015-03-26T15:06:36.000Z","updated_at":"2023-09-08T16:56:04.000Z","dependencies_parsed_at":"2022-08-30T10:50:35.329Z","dependency_job_id":null,"html_url":"https://github.com/weppos/gomotion2015","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/weppos%2Fgomotion2015","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weppos%2Fgomotion2015/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weppos%2Fgomotion2015/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weppos%2Fgomotion2015/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weppos","download_url":"https://codeload.github.com/weppos/gomotion2015/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245423253,"owners_count":20612749,"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-10-15T01:54:28.105Z","updated_at":"2025-03-25T08:15:34.846Z","avatar_url":"https://github.com/weppos.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gomotion2015\n\nThis project was used as a practical introduction to Golang for [my 15' talk](https://speakerdeck.com/weppos/practical-introduction-to-golang-codemotion-rome-2015) at [Codemotion 2015](http://rome2015.codemotionworld.com/).\n\nThe app is not just an example, (believe it or not) it works for real! The app exposes a system binary, for example `dig`, via an HTTP interface.\n\nThis is just an example of something you can create with Go. The project was used to introduce Golang features and design to a beginner audience, therefore expect the final app to be fairly simple. Each commit of this repo represents a baby-step towards the final app.\n\n## Outline\n\nThis outline details the Go features the code aims to highlight on each task (represented by a single commit).\n\n### Let's get it started\n\n- Create folder\n- Empty git repo\n- Special workspace rules\n\n### All belongs to main()\n\n- Create main file with arbitrary name\n- main package\n- main() function\n- Note: indentation with tabs\n- $ go run app.go\n- $ go run app.go \u0026\u0026 echo $?\n\n### Hello Simone!\n\n- single-line import\n- package method invocation\n- Note: title-case method\n- $ go run app.go\n- $ go build app.go \u0026\u0026 ./app\n\n### Let's Dig into something cool\n\n- function signature\n- Note: title-case vs lower-case\n- Note: return arguments\n- Note: error management\n- if works as in any other language\n- boring variable declaration\n- error checking in main()\n\n### What are your Args?\n\n- Reading CLI arguments\n- Validating CLI arguments\n- Note: := assignment\n\n### Go style\n\n- := assignment\n\n### (one-line) Go style\n\n- one-line assignment-if-check\n- Note: scope\n- Note: performance\n\n### Exec this\n\n- copy\u0026paste\n- execute a real dig request\n\n### Do you HTTP?\n\n- HTTP standard library\n\n### More Go goodness\n\n- defer\n\n### Spring cleanup\n\n- go fmt\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweppos%2Fgomotion2015","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweppos%2Fgomotion2015","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweppos%2Fgomotion2015/lists"}