├── 27_code-in-process ├── 54_AJAX │ ├── 01 │ │ └── test.html │ └── 02_users_datastore_exercise_AJAX │ │ └── app.yaml ├── 27_package-os │ ├── 01_Read │ │ └── 01 │ │ │ ├── dst.txt │ │ │ └── src.txt │ ├── 02_Write │ │ └── 02 │ │ │ └── hello.txt │ ├── 07_Stdout_Stdin │ │ ├── 02 │ │ │ └── main.go │ │ └── 01 │ │ │ └── main.go │ └── 00_args │ │ └── main.go ├── 30_package-io │ ├── 05_ReadFull │ │ ├── dst.txt │ │ └── src.txt │ ├── 04_TeeReader │ │ ├── 01 │ │ │ └── src.txt │ │ └── 02 │ │ │ └── src.txt │ ├── 06_LimitReader │ │ └── src.txt │ ├── 07_WriteString │ │ ├── 01_one-way │ │ │ └── hello.txt │ │ └── 02_another-way │ │ │ └── hello.txt │ └── 01_copy │ │ └── main.go ├── 57_appengine-channel │ ├── 02_chat-room │ │ ├── public │ │ │ └── main.css │ │ ├── app.yaml │ │ └── routes.go │ └── 01_basic │ │ └── app.yaml ├── 38_JSON │ ├── 12 │ │ └── data.json │ └── 13 │ │ └── data.json ├── 31_package-ioutil │ ├── 03_ReadAll_WriteFile │ │ └── hey.txt │ └── 02_WriteFile │ │ └── main.go ├── 98-good-student-code │ └── daniel │ │ ├── Week6 │ │ ├── 7-polymer │ │ │ ├── 3-properties │ │ │ │ ├── 1-index.html │ │ │ │ └── 1-polymer.html │ │ │ ├── 4-local-dom │ │ │ │ ├── 1-index.html │ │ │ │ ├── 1-polymer.html │ │ │ │ └── 2-diploma-bg.jpg │ │ │ ├── 5-data-binding │ │ │ │ ├── 1-index.html │ │ │ │ ├── 1-polymer.html │ │ │ │ ├── 2-index.html │ │ │ │ ├── 2-polymer.html │ │ │ │ └── 2-diploma-bg.jpg │ │ │ └── 1-registering │ │ │ │ ├── 1-plain.html │ │ │ │ ├── 1-polymer.html │ │ │ │ └── 1-index.html │ │ ├── 2-browser-devtools │ │ │ ├── zordpress │ │ │ │ └── js │ │ │ │ │ └── save.js │ │ │ ├── common │ │ │ │ ├── todd.jpg │ │ │ │ ├── zeno.jpg │ │ │ │ └── andrew.jpg │ │ │ ├── zlickr │ │ │ │ └── img │ │ │ │ │ ├── 1.jpg │ │ │ │ │ ├── 2.jpg │ │ │ │ │ ├── 3.jpg │ │ │ │ │ ├── 4.jpg │ │ │ │ │ ├── 5.jpg │ │ │ │ │ ├── 6.jpg │ │ │ │ │ ├── 7.jpg │ │ │ │ │ └── 8.jpg │ │ │ └── zmail │ │ │ │ └── js │ │ │ │ ├── count.js │ │ │ │ └── menu.js │ │ ├── 3-html5 │ │ │ └── 7-progress │ │ │ │ ├── progress.gif │ │ │ │ └── index.html │ │ ├── 1-text-editors │ │ │ └── 1-emmet.html │ │ └── 5-web-components │ │ │ ├── 2-html-templates │ │ │ └── 1-fresno-night.jpg │ │ │ └── 4-html-imports │ │ │ ├── 1-index.html │ │ │ └── 1-component.html │ │ ├── Week7 │ │ ├── my-cat │ │ │ └── hello.txt │ │ ├── capitalize │ │ │ └── test.txt │ │ ├── Hello │ │ │ └── main.go │ │ └── monuments │ │ │ └── test.html │ │ ├── Week8 │ │ ├── json-example │ │ │ └── data.json │ │ ├── static-http │ │ │ └── main.go │ │ ├── firstTemplate │ │ │ └── tpl.gohtml │ │ ├── firstAppEngine │ │ │ └── app.yaml │ │ ├── profile │ │ │ ├── app.yaml │ │ │ └── viewProfile.gohtml │ │ ├── todolist │ │ │ └── app.yaml │ │ ├── testExample │ │ │ └── example.go │ │ └── colors │ │ │ └── main.go │ │ ├── Week5 │ │ └── web-components-training-exercises │ │ │ ├── README.md │ │ │ └── nesting-components │ │ │ └── accordion_component │ │ │ └── styles.css │ │ ├── Week1 │ │ └── google │ │ │ └── mic.gif │ │ ├── Week2 │ │ ├── destructButton │ │ │ └── zombie.jpg │ │ ├── changingBackground │ │ │ ├── changingBackground.css │ │ │ ├── wallpapers │ │ │ │ ├── 1036809-1440x900-[DesktopNexus.com].jpg │ │ │ │ ├── 1062969-1440x900-[DesktopNexus.com].jpg │ │ │ │ ├── 729965-1440x900-[DesktopNexus.com].jpg │ │ │ │ ├── 813495-1440x900-[DesktopNexus.com].jpg │ │ │ │ └── 821425-1440x900-[DesktopNexus.com].jpg │ │ │ └── changingBackground.html │ │ └── magic8ball │ │ │ └── magic-ball.js │ │ ├── Week9 │ │ ├── storageExample │ │ │ └── app.yaml │ │ ├── chat-example │ │ │ ├── app.yaml │ │ │ └── routes.go │ │ └── movie-search │ │ │ ├── app.yaml │ │ │ ├── templates │ │ │ ├── movie.gohtml │ │ │ └── header.gohtml │ │ │ ├── template.go │ │ │ └── route.go │ │ ├── Week3 │ │ └── loadImage │ │ │ └── images │ │ │ ├── Xhou_Ta.jpg │ │ │ ├── Xhou_Ta_tn.jpg │ │ │ ├── Hassum_Harrod.jpg │ │ │ ├── LaVonne_LaRue.jpg │ │ │ ├── Barot_Bellingham.jpg │ │ │ ├── Constance_Smith.jpg │ │ │ ├── Hassum_Harrod_tn.jpg │ │ │ ├── Hillary_Goldwynn.jpg │ │ │ ├── Jennifer_Jerome.jpg │ │ │ ├── Jonathan_Ferrar.jpg │ │ │ ├── LaVonne_LaRue_tn.jpg │ │ │ ├── Riley_Rewington.jpg │ │ │ ├── Constance_Smith_tn.jpg │ │ │ ├── Jennifer_Jerome_tn.jpg │ │ │ ├── Jonathan_Ferrar_tn.jpg │ │ │ ├── Lorenzo_Garcia_01.jpg │ │ │ ├── Lorenzo_Garcia_02.jpg │ │ │ ├── Lorenzo_Garcia_03.jpg │ │ │ ├── Lorenzo_Garcia_04.jpg │ │ │ ├── Riley_Rewington_01.jpg │ │ │ ├── Riley_Rewington_02.jpg │ │ │ ├── Riley_Rewington_03.jpg │ │ │ ├── Riley_Rewington_04.jpg │ │ │ ├── Riley_Rewington_05.jpg │ │ │ ├── Riley_Rewington_06.jpg │ │ │ ├── Riley_Rewington_tn.jpg │ │ │ ├── Barot_Bellingham_tn.jpg │ │ │ ├── Hillary_Goldwynn_01.jpg │ │ │ ├── Hillary_Goldwynn_02.jpg │ │ │ ├── Hillary_Goldwynn_03.jpg │ │ │ ├── Hillary_Goldwynn_04.jpg │ │ │ ├── Hillary_Goldwynn_05.jpg │ │ │ ├── Hillary_Goldwynn_06.jpg │ │ │ ├── Hillary_Goldwynn_07.jpg │ │ │ ├── Hillary_Goldwynn_tn.jpg │ │ │ ├── Lorenzo_Garcia_01_tn.jpg │ │ │ ├── Lorenzo_Garcia_02_tn.jpg │ │ │ ├── Lorenzo_Garcia_03_tn.jpg │ │ │ ├── Lorenzo_Garcia_04_tn.jpg │ │ │ ├── Riley_Rewington_01_tn.jpg │ │ │ ├── Riley_Rewington_02_tn.jpg │ │ │ ├── Riley_Rewington_03_tn.jpg │ │ │ ├── Riley_Rewington_04_tn.jpg │ │ │ ├── Riley_Rewington_05_tn.jpg │ │ │ ├── Riley_Rewington_06_tn.jpg │ │ │ ├── Hillary_Goldwynn_01_tn.jpg │ │ │ ├── Hillary_Goldwynn_02_tn.jpg │ │ │ ├── Hillary_Goldwynn_03_tn.jpg │ │ │ ├── Hillary_Goldwynn_04_tn.jpg │ │ │ ├── Hillary_Goldwynn_05_tn.jpg │ │ │ ├── Hillary_Goldwynn_06_tn.jpg │ │ │ └── Hillary_Goldwynn_07_tn.jpg │ │ ├── Week10 │ │ ├── payment │ │ │ └── app.yaml │ │ ├── dropbox-api │ │ │ └── app.yaml │ │ └── filebrowser │ │ │ └── app.yaml │ │ └── Week4 │ │ ├── angularAjax │ │ ├── script.js │ │ ├── data.json │ │ └── gulpfile.js │ │ ├── flickrFeed │ │ └── package.json │ │ ├── liveSearch │ │ └── package.json │ │ └── mustacheTemplate │ │ ├── package.json │ │ └── data.json ├── 37_review-exercises │ ├── 08_cp │ │ ├── 01 │ │ │ └── initial.txt │ │ ├── 02 │ │ │ └── initial.txt │ │ ├── 03 │ │ │ └── initial.txt │ │ ├── 04_io-copy │ │ │ └── initial.txt │ │ └── 07_io-copy_bufio-NewReader │ │ │ └── initial.txt │ ├── 16_csv_stock-prices │ │ └── step03_charting │ │ │ └── charting_graphing.txt │ ├── 04_swap-two_pointers │ │ └── main.go │ └── 01_gravatar │ │ └── page.html ├── 67_digital-ocean_aerospike │ └── 02_fullsite │ │ └── .gitignore ├── 56_twitter │ ├── 05_document │ │ └── templates │ │ │ └── html │ │ │ └── footer.html │ ├── 06_document │ │ └── templates │ │ │ └── html │ │ │ └── footer.html │ ├── 11_HTTPS-TLS │ │ ├── templates │ │ │ └── html │ │ │ │ └── footer.html │ │ └── app.yaml │ ├── 07_app-engine │ │ ├── templates │ │ │ └── html │ │ │ │ └── footer.html │ │ └── app.yaml │ ├── 08_julien-schmidt │ │ ├── templates │ │ │ └── html │ │ │ │ └── footer.html │ │ └── app.yaml │ ├── 09_login-form │ │ ├── templates │ │ │ └── html │ │ │ │ └── footer.html │ │ └── app.yaml │ ├── 12_error-handling │ │ ├── templates │ │ │ └── html │ │ │ │ └── footer.html │ │ └── app.yaml │ ├── 13_login_unfinished │ │ ├── templates │ │ │ └── html │ │ │ │ └── footer.html │ │ └── app.yaml │ ├── 04_template_abstraction │ │ └── templates │ │ │ └── html │ │ │ └── footer.html │ ├── 10_signup-form-validate │ │ ├── 02v_datastore-put │ │ │ ├── templates │ │ │ │ └── html │ │ │ │ │ └── footer.html │ │ │ └── app.yaml │ │ └── 01v_form-validation │ │ │ ├── templates │ │ │ └── html │ │ │ │ └── footer.html │ │ │ └── app.yaml │ ├── 18_abstract-API-Model │ │ ├── Model │ │ │ └── users.go │ │ └── app.yaml │ ├── 19_abstract-API-Model_AE-fix │ │ ├── Model │ │ │ └── users.go │ │ └── App │ │ │ └── app.yaml │ ├── 40_send-email │ │ └── app.yaml │ ├── 24_session │ │ ├── model.go │ │ └── app.yaml │ ├── 25_session-all-pages │ │ ├── model.go │ │ └── app.yaml │ ├── 26_login │ │ ├── app.yaml │ │ ├── model.go │ │ └── notes.txt │ ├── 27_logout │ │ ├── app.yaml │ │ └── model.go │ ├── 32_tweets │ │ └── app.yaml │ ├── 37_other-implementations │ │ ├── 01_daniel │ │ │ ├── templates │ │ │ │ └── tweet.gohtml │ │ │ └── app.yaml │ │ ├── 03_t │ │ │ ├── app.yaml │ │ │ └── templates │ │ │ │ └── html │ │ │ │ ├── home.html │ │ │ │ └── profile.html │ │ └── 02_tommy │ │ │ └── app.yaml │ ├── 38_follow │ │ └── app.yaml │ ├── 14_code-review │ │ └── app.yaml │ ├── 28_code-review │ │ ├── app.yaml │ │ └── model.go │ ├── 34_humanize │ │ └── app.yaml │ ├── 36_user-tweets │ │ └── app.yaml │ ├── 39_unfollow │ │ └── app.yaml │ ├── 42_following │ │ └── app.yaml │ ├── 44_code-review │ │ └── app.yaml │ ├── 15_memcache-home │ │ └── app.yaml │ ├── 22_set-cookie_PATH │ │ └── app.yaml │ ├── 23_set-cookie-UUID │ │ └── app.yaml │ ├── 31_modal-post-tweet │ │ ├── app.yaml │ │ └── model.go │ ├── 43_following-me │ │ └── app.yaml │ ├── 17_memcache-templates │ │ └── app.yaml │ ├── 21_set-cookie_no-PATH │ │ └── app.yaml │ ├── 29_password-encryption │ │ ├── app.yaml │ │ └── model.go │ ├── 30_turn-off-memcache │ │ ├── app.yaml │ │ └── model.go │ ├── 33_display-all-tweets │ │ └── app.yaml │ ├── 41_twitter-send-email │ │ └── app.yaml │ ├── 16_abstract-memcache-code │ │ └── app.yaml │ └── 20_reverting_to_only_package-main │ │ └── app.yaml ├── 97_temp │ └── 02 │ │ ├── 02 │ │ └── main.go ├── 50_exif │ └── 01.jpg ├── 39_packages │ ├── hello │ │ └── hello.go │ └── main │ │ └── main.go ├── 41_TCP │ ├── 03_dial │ │ └── 00_notes.txt │ ├── 02_listen │ │ └── 00_notes.txt │ ├── 04_echo-server │ │ ├── v01 │ │ │ └── 00_notes.txt │ │ └── v02 │ │ │ └── 00_notes.txt │ └── 05_redis-clone │ │ └── i01 │ │ └── i01_notes.txt ├── 66_authentication_OAUTH │ ├── 02_manual-auth │ │ ├── 04_bcrypt │ │ │ └── 01 │ │ │ │ └── README.txt │ │ ├── 02_gorilla_REVIEW_photo-blog │ │ │ └── 02_photo-blog │ │ │ │ └── assets │ │ │ │ └── imgs │ │ │ │ ├── 01.jpg │ │ │ │ ├── 982a5e1884f21dc2a0e0d27e844e97607445b44e.jpg │ │ │ │ └── b8869c3daeb40f44ed3e5d39e5f8665dd90e9f50.jpg │ │ └── 03_memcache_REVIEW_twitter │ │ │ └── app.yaml │ ├── 03_oauth-github │ │ ├── 06-complete │ │ │ ├── cron.yaml │ │ │ └── app.yaml │ │ ├── 05_configuration_scheduled-tasks_cron │ │ │ ├── cron.yaml │ │ │ └── app.yaml │ │ ├── 02_access-token │ │ │ └── app.yaml │ │ ├── 04_user-email │ │ │ └── app.yaml │ │ ├── 01_authorization-code │ │ │ └── app.yaml │ │ └── 03_url-ParseQuery │ │ │ └── app.yaml │ ├── 05_oauth-google │ │ └── app.yaml │ ├── 08_oauth-dropbox │ │ └── app.yaml │ └── 01_app-engine-auth_REVIEW │ │ └── app.yaml ├── 42_HTTP │ └── 01_header │ │ └── 00_notes.txt ├── 60_movie-website │ ├── 01_search │ │ ├── types.go │ │ ├── app.yaml │ │ ├── templates │ │ │ └── index.gohtml │ │ ├── templates.go │ │ └── routes.go │ └── 02_image-upload-GCS │ │ ├── app.yaml │ │ ├── types.go │ │ ├── templates │ │ └── index.gohtml │ │ └── templates.go ├── 45_serving-files │ ├── 02 │ │ └── toby.jpg │ ├── 03 │ │ └── toby.jpg │ ├── 04_io-Copy │ │ └── toby.jpg │ ├── 06_ServeFile │ │ └── toby.jpg │ ├── 05_ServeContent │ │ └── toby.jpg │ ├── 07_FileServer │ │ └── toby.jpg │ ├── 08_FileServer │ │ └── assets │ │ │ └── toby.jpg │ ├── 09_FileServer │ │ └── assets │ │ │ └── toby.jpg │ ├── 10_static-file-server │ │ └── main.go │ └── 11_static-file-server │ │ └── main.go ├── 46_errata │ ├── 05_ServeFile │ │ └── toby.jpg │ └── 03_URL │ │ └── main.go ├── 68_task-queue │ ├── 02_delay-cron │ │ ├── cron.yaml │ │ └── app.yaml │ ├── 05_github-cron │ │ ├── cron.yaml │ │ └── app.yaml │ ├── 01_delay │ │ └── app.yaml │ ├── 03_github │ │ └── app.yaml │ └── 04_github-goroutines │ │ └── app.yaml ├── 26_playing-with-type │ ├── 00_types │ │ ├── 01_division │ │ │ ├── 01_int-int │ │ │ │ └── main.go │ │ │ ├── 02_int-float │ │ │ │ └── main.go │ │ │ ├── 03_var_int-float │ │ │ │ └── main.go │ │ │ └── 04_var_int-float_invalid-code │ │ │ │ └── main.go │ │ ├── 02_strings │ │ │ ├── 04_len │ │ │ │ ├── 01_len-english │ │ │ │ │ └── main.go │ │ │ │ └── 02_len-chinese │ │ │ │ │ └── main.go │ │ │ ├── 01_escape-sequences │ │ │ │ └── main.go │ │ │ ├── 07_concatenation │ │ │ │ └── main.go │ │ │ ├── 05_index-access │ │ │ │ └── main.go │ │ │ ├── 02_sequence-of-bytes │ │ │ │ └── main.go │ │ │ └── 06_slicing │ │ │ │ └── 02 │ │ │ │ └── main.go │ │ ├── 03_strconv │ │ │ ├── 02_fmt-sprint │ │ │ │ └── main.go │ │ │ ├── 03_atoi │ │ │ │ └── main.go │ │ │ └── 01_itoa │ │ │ │ └── main.go │ │ └── 06_math-pkg │ │ │ └── main.go │ ├── xx07_int │ │ └── main.go │ ├── 02_string │ │ └── main.go │ ├── xx08_slice-ints │ │ └── main.go │ ├── xx05_slice-strings │ │ └── main.go │ ├── 03_string-conversion │ │ └── main.go │ ├── 04_string_assertion_invalid-code │ │ └── main.go │ └── xx06_slice-strings_conversion │ │ └── main.go ├── 34_package-time │ ├── 01_now │ │ └── main.go │ └── 02_time-parse │ │ ├── 01 │ │ └── main.go │ │ └── 02 │ │ └── main.go ├── 61_http-giffy │ └── app.yaml ├── 99_svcc │ ├── 26_serving-files_io-Copy │ │ └── toby.jpg │ ├── 44_file-paths │ │ ├── assets │ │ │ └── imgs │ │ │ │ └── 01.jpg │ │ └── main.go │ ├── 28_serving-files_ServeFile │ │ └── toby.jpg │ ├── 27_serving-files_ServeContent │ │ └── toby.jpg │ ├── 29_serving-files_FileServer │ │ └── toby.jpg │ ├── 30_serving-files_FileServer │ │ └── assets │ │ │ └── toby.jpg │ ├── 31_serving-files_FileServer │ │ └── assets │ │ │ └── toby.jpg │ ├── 32_static-FileServer │ │ ├── assets │ │ │ └── images │ │ │ │ ├── favicon.ico │ │ │ │ └── home │ │ │ │ ├── speakers.jpg │ │ │ │ ├── ray_villalobos.jpg │ │ │ │ └── dev_fest-as-Smart-Object-1.jpg │ │ └── main.go │ ├── 45_sessions_GORILLA_photo-blog │ │ └── assets │ │ │ └── imgs │ │ │ ├── 01.jpg │ │ │ ├── 6fc3a32bcd369a0e908dec305a510595a07b0235.jpg │ │ │ └── be8cc3d85b3e75846d55517f7334bef69446784b.jpg │ ├── 04_pipeline │ │ └── tpl.gohtml │ ├── 03_text-template │ │ └── tpl.gohtml │ ├── 07_composition │ │ └── tpl.gohtml │ ├── 10_xss │ │ ├── tpl.gohtml │ │ └── index.html │ ├── 12_parsefiles │ │ ├── tpl.gohtml │ │ └── tpl2.gohtml │ ├── 11_html-templates │ │ ├── tpl.gohtml │ │ └── index.html │ ├── 13_ParseGlob │ │ └── templates │ │ │ ├── tpl.gohtml │ │ │ └── tpl2.gohtml │ ├── 05_pipeline-range │ │ └── tpl.gohtml │ └── 06_pipeline-range-else │ │ └── tpl.gohtml ├── 58_appengine-search │ └── app.yaml ├── 63_GCS-filebrowser │ ├── app.yaml │ └── README.txt ├── 64_csv-example │ ├── 01 │ │ └── app.yaml │ └── 02 │ │ └── app.yaml ├── 53_datastore │ ├── 02 │ │ ├── 02 │ │ │ └── app.yaml │ │ ├── 01_put │ │ │ └── app.yaml │ │ ├── 03_get │ │ │ └── app.yaml │ │ ├── 04_query-filter │ │ │ └── app.yaml │ │ └── 05_query-ancestor │ │ │ └── app.yaml │ ├── 00_appengine-documentation-example │ │ ├── 03_no-favicon │ │ │ └── app.yaml │ │ ├── 04_no-favicon │ │ │ └── app.yaml │ │ ├── 01_with-modifications │ │ │ └── app.yaml │ │ └── 02_as-in-documentation │ │ │ └── app.yaml │ ├── 03_users_datastore_exercise │ │ └── app.yaml │ └── 04_julien-schmidt-router │ │ └── 02-with-appengine │ │ └── app.yaml ├── 52_memcache │ ├── 01_get-nil │ │ └── app.yaml │ ├── 02_set_get │ │ └── app.yaml │ ├── 03_expiration │ │ └── app.yaml │ ├── 05_memcache-session │ │ ├── 01i │ │ │ ├── app.yaml │ │ │ └── main.go │ │ ├── 02i │ │ │ └── app.yaml │ │ ├── 03i │ │ │ └── app.yaml │ │ ├── 04i │ │ │ └── app.yaml │ │ ├── 05i │ │ │ └── app.yaml │ │ └── 06_photo-blog_UNFINISHED │ │ │ ├── app.yaml │ │ │ └── assets │ │ │ └── imgs │ │ │ └── 01.jpg │ └── 04_increment │ │ └── app.yaml ├── 62_self-destructing-message │ ├── 01 │ │ └── app.yaml │ └── 02_crypto │ │ ├── 04_complete │ │ └── app.yaml │ │ └── 01_nonce │ │ └── main.go ├── 51_appengine-introduction │ ├── 01_hello-world │ │ ├── app.yaml │ │ └── hello.go │ ├── 05_GORILLA_photo-blog │ │ ├── app.yaml │ │ └── assets │ │ │ └── imgs │ │ │ └── 01.jpg │ ├── 03_google-maps-api │ │ ├── app.yaml │ │ └── assets │ │ │ └── img │ │ │ └── IMG_20150714_191905.jpg │ ├── 02_photo-blog_somewhat-crappy-code-FYI │ │ ├── app.yaml │ │ └── assets │ │ │ └── imgs │ │ │ ├── CANADA 023.jpg │ │ │ └── to_upload.jpg │ └── 04_SERVICE_users │ │ └── app.yaml ├── 65_accepting-credit-cards │ ├── 05_charging │ │ ├── minions.jpg │ │ └── app.yaml │ ├── 06_idempotent │ │ ├── minions.jpg │ │ └── app.yaml │ ├── 07_complete │ │ ├── minions.jpg │ │ └── app.yaml │ ├── 01_basic-setup │ │ └── app.yaml │ ├── 03_stripe-token │ │ ├── minions.jpg │ │ └── app.yaml │ ├── 02_customizing_UI │ │ ├── minions.jpg │ │ └── app.yaml │ └── 04_err-because-of-app-engine │ │ ├── app.yaml │ │ └── minions.jpg ├── 59_appengine-GCS-storage │ ├── 01_NewWriter_PEM-auth │ │ └── app.yaml │ ├── 02_NewWriter_JSON-auth │ │ └── app.yaml │ └── 03_put-get-list_JSON-auth │ │ └── app.yaml ├── 49_cookies-sessions │ └── 12_GORILLA_photo-blog │ │ └── assets │ │ └── imgs │ │ ├── 01.jpg │ │ ├── 3965abfccced1772f3ad984bcbc7c80d2a17c164.jpg │ │ ├── ba2081058f83d0b91877f7789b9ae54790c1f3c2.jpg │ │ └── d4e3b9efe789874cc85596c7721987d4c8f363c8.jpg ├── 55_todo-list │ ├── 02v_input │ │ └── app.yaml │ └── 01v_content-editable │ │ └── app.yaml ├── 40_testing │ ├── 01 │ │ ├── main.go │ │ └── example │ │ │ ├── sum_test.go │ │ │ └── sum.go │ └── 02 │ │ ├── main.go │ │ └── example │ │ └── sum.go ├── 47_templates │ ├── 01_text-templates │ │ ├── 11 │ │ │ └── tpl.gohtml │ │ ├── 08 │ │ │ └── tpl.gohtml │ │ ├── 01 │ │ │ └── tpl.gohtml │ │ ├── 02 │ │ │ └── tpl.gohtml │ │ ├── 03 │ │ │ └── tpl.gohtml │ │ ├── 04 │ │ │ └── tpl.gohtml │ │ ├── 09_function │ │ │ └── tpl.gohtml │ │ ├── 10_function │ │ │ └── tpl.gohtml │ │ ├── 05 │ │ │ └── tpl.gohtml │ │ ├── 06 │ │ │ └── tpl.gohtml │ │ └── 07 │ │ │ └── tpl.gohtml │ ├── x03_exercises │ │ ├── 01 │ │ │ └── hw.gohtml │ │ └── 02 │ │ │ └── hw.gohtml │ └── 02_html-templates │ │ ├── 01 │ │ └── tpl.gohtml │ │ ├── 02 │ │ └── tpl.gohtml │ │ ├── 03 │ │ ├── tpl.gohtml │ │ └── tpl2.gohtml │ │ ├── 04 │ │ ├── tpl.gohtml │ │ └── tpl2.gohtml │ │ └── 05 │ │ └── templates │ │ ├── tpl.gohtml │ │ └── tpl2.gohtml ├── 35_hash │ ├── 00_notes │ │ └── notes.txt │ ├── 01_FNV │ │ ├── 01 │ │ │ └── main.go │ │ └── 02 │ │ │ └── main.go │ └── 02_MD5 │ │ └── 01 │ │ └── main.go └── 43_HTTP-server │ └── 01 │ └── i01 │ └── main.go ├── 04_scope ├── 05_same-package │ ├── same.go │ └── main.go ├── 03_order-matters │ └── main.go ├── 01_package-scope │ ├── 02_visibility │ │ ├── vis │ │ │ ├── name.go │ │ │ └── printer.go │ │ └── main │ │ │ └── main.go │ └── 01 │ │ └── main.go ├── 02_block-scope │ ├── 01_this-does-not-compile │ │ └── main.go │ └── 02_closure │ │ └── 01 │ │ └── main.go └── 04_variable-shadowing │ └── main.go ├── README.md ├── 26_QUESTIONS-FROM-STUDENTS └── 01-package-scope │ ├── variables.go │ └── main.go ├── 01_getting-started ├── 01_helloWorld │ └── main.go ├── 02_numeral-systems │ ├── 01_decimal │ │ └── main.go │ ├── 02_binary │ │ └── main.go │ ├── 04_loop │ │ └── main.go │ └── 03_hexadecimal │ │ └── main.go └── 03_UTF-8 │ └── main.go ├── 23_error-handling ├── 02_err-not-nil │ ├── 03_log-set-output │ │ └── log.txt │ └── 05_panic │ │ └── main.go └── 01_golint │ ├── 02_after │ └── main.go │ └── 01_before │ └── main.go ├── LICENSE.txt ├── 13_exercise-solutions ├── 01_hello-world │ └── main.go ├── 08_just-fyi │ ├── 03_utf │ │ └── main.go │ └── 01_benchMark │ │ └── bm_test.go ├── 02_hello-NAME │ └── main.go ├── 05_even-numbers │ └── main.go ├── 03_hello-user-input │ └── main.go └── 04_user-enters-numbers │ └── main.go ├── 02_package ├── stringutil │ ├── name.go │ └── reverseTwo.go └── icomefromalaska │ └── name2.go ├── 24_testing └── math.go ├── 14_functions ├── 16_anon_self-executing │ └── main.go ├── 01_main │ └── main.go ├── 03_two-params │ ├── 02 │ │ └── main.go │ └── 01 │ │ └── main.go ├── 10_func-expression │ ├── 01_before-func-expression │ │ └── main.go │ ├── 02_func-expression │ │ └── main.go │ ├── 03_func-expression_shows-type │ │ └── main.go │ ├── 04_another-way_func-expression │ │ └── main.go │ └── 05_another-way_func-expression_shows-type │ │ └── main.go ├── 04_return │ └── main.go ├── 13_recursion │ └── main.go ├── 14_defer │ ├── 01_no-defer │ │ └── main.go │ └── 02_with-defer │ │ └── main.go ├── 06_return-multiple │ └── main.go ├── 02_param-arg │ └── main.go ├── 11_closure │ └── 01 │ │ └── main.go ├── 15_passing-by-value │ ├── 06_REFERENCE-TYPE │ │ └── main.go │ ├── 01_int │ │ └── main.go │ └── 03_string │ │ └── main.go ├── 08_variadic-args │ └── main.go ├── 09_slice-param-arg │ └── main.go └── 12_callbacks │ └── 01_print-nums │ └── main.go ├── 15_bool-expressions ├── 03_or │ └── main.go ├── 04_and │ └── main.go ├── 01_true-false │ └── main.go └── 02_not │ └── main.go ├── 10_for-loop ├── 01_init-condition-post │ └── main.go ├── 04_for_no-condition │ └── main.go ├── 03_for-condition-while-ish │ └── main.go ├── 02_nested │ └── main.go ├── 05_for_break │ └── main.go ├── 07_rune-loop_UTF8 │ └── 02 │ │ └── main.go └── 06_for_continue │ └── main.go ├── 16_exercise-solutions ├── 04_bool-expression │ └── main.go ├── 02_func-expression │ └── main.go ├── 01_half │ ├── 01 │ │ └── main.go │ └── 02 │ │ └── main.go └── 05_params-and-args │ └── main.go ├── 19_map ├── 14_hash-table │ └── 01_letter-buckets │ │ ├── 02_strings-to-rune-conversion │ │ └── main.go │ │ ├── 01_runes-are-numbers │ │ └── main.go │ │ ├── 03_string-index-access │ │ └── main.go │ │ ├── 04_remainder-bucket-selection │ │ └── main.go │ │ ├── 09_int-slice-plus-plus │ │ └── main.go │ │ └── 05_hash-function │ │ └── main.go ├── 02_var_make │ └── main.go ├── 03_shorthand_make │ └── main.go ├── 04_shorthand_composite-literal │ └── main.go ├── 05_shorthand_composite-literal │ └── main.go ├── 07_len │ └── main.go ├── 06_adding-entry │ └── main.go ├── 13_loop-range │ └── main.go ├── 11_deleting-entry_no-error │ └── main.go ├── 08_updating-entry │ └── main.go └── 09_deleting-entry │ └── main.go ├── 03_variables ├── 03_less-emphasis │ ├── 08_exercise_your-name │ │ ├── 02_anotherSolution │ │ │ └── myNameVar.go │ │ ├── 03_anotherSolution │ │ │ └── myNameVar.go │ │ ├── 01_oneSolution │ │ │ └── myNameVar.go │ │ └── 04_anotherSolution │ │ │ └── myNameVar.go │ ├── 01_declare-variable │ │ └── var.go │ ├── 04_infer-type │ │ └── var.go │ ├── 03_init-many-at-once │ │ └── var.go │ ├── 05_infer-mixed-up-types │ │ └── var.go │ ├── 02_declare-many-at-once │ │ └── var.go │ └── 06_init-shorthand │ │ └── var.go └── 02_var_zero-value │ └── main.go ├── 18_slice ├── 01_int-slice │ └── main.go ├── 02_int-slice │ └── main.go ├── 13_int-slice-plus-plus │ └── main.go ├── 12_multi-dimensional │ ├── 02_var-slice │ │ └── main.go │ ├── 01_shorthand-slice │ │ └── main.go │ ├── 03_make-slice │ │ └── main.go │ └── 04_comparing_shorthand_var_make │ │ ├── 02_var-slice │ │ └── main.go │ │ ├── 01_shorthand-slice │ │ └── main.go │ │ └── 03_make-slice │ │ └── main.go └── 10_append_slice-to-slice │ ├── 01_slice-of-ints │ └── main.go │ └── 02_slice-of-strings │ └── main.go ├── 21_interfaces ├── 05_conversion-vs-assertion │ ├── 02_assertion │ │ ├── 06_interface-int-sum │ │ │ └── main.go │ │ ├── 04_interface-int_print-type │ │ │ └── main.go │ │ ├── 05_interface-int_mistmatched-types-error │ │ │ └── main.go │ │ ├── 07_casting-reminder │ │ │ └── main.go │ │ ├── 02_interface-string │ │ │ └── main.go │ │ ├── 03_interface-string_not-ok │ │ │ └── main.go │ │ └── 01_non-interface-error_invalid-code │ │ │ └── main.go │ └── 01_conversion │ │ ├── 02_float-to-int │ │ └── main.go │ │ ├── 01_int-to-float │ │ └── main.go │ │ ├── 06_strconv │ │ ├── 01_Atoi │ │ │ └── main.go │ │ └── 02_Itoa │ │ │ └── main.go │ │ ├── 05_string-to-slice-of-bytes │ │ └── main.go │ │ └── 04_rune-to-slice-of-bytes-to-string │ │ └── main.go ├── 02_package-sort │ ├── 07_sort-Ints │ │ └── main.go │ ├── 03_sort-Strings │ │ └── main.go │ ├── 05_sort-int_type-IntSlice │ │ └── main.go │ ├── 06_sort-int_type-IntSlice_reverse │ │ └── main.go │ └── 00_notes.txt └── 01_interface │ └── 01_no-interface │ └── main.go ├── 12_if_else-if_else ├── 08_divisibleByThree │ └── main.go ├── 03_init-statement │ └── main.go ├── 01_eval-true │ └── main.go ├── 05_if-else │ └── main.go ├── 02_not-exclamation │ └── main.go ├── 04_init-statement_error_invalid-code │ └── main.go └── 06_if-elseif-else │ └── main.go ├── 17_array ├── 01 │ └── main.go ├── 02 │ └── main.go ├── 05 │ └── main.go ├── 03 │ └── main.go └── 04 │ └── main.go ├── 22_go-routines ├── 15_for-fun │ └── README.md ├── 10_deadlock-challenges │ ├── 02_deadlock-solution │ │ └── main.go │ └── 01_deadlock-challenge │ │ └── main.go ├── 09_channels │ └── 01_range │ │ └── main.go ├── 01_no-go │ └── main.go └── 02_go_concurrency │ └── main.go ├── 08_pointers └── 04_using-pointers │ ├── 02_pointer │ ├── 01 │ │ └── main.go │ └── 02_see-the-addresses │ │ └── main.go │ └── 01_no-pointer │ └── 01 │ └── main.go ├── 05_blank-identifier ├── 01_invalid-code │ └── main.go └── 02_http-get_example │ └── 02_no-error-checking │ └── main.go ├── 06_constants ├── 02_multiple-initialization │ └── main.go ├── 03_iota │ └── main.go ├── 04_iota │ └── main.go ├── 06_iota │ └── main.go └── 01_constant │ └── main.go ├── 20_struct ├── 01_user-defined-types │ └── 01_alias-type_not-idiomatic │ │ └── main.go ├── 06_struct-pointer │ └── main.go └── 08_encode_decode │ └── 01_encode │ └── main.go ├── 07_memory-address ├── 01_showing-address │ └── main.go └── 02_using-address │ └── main.go └── 09_remainder └── main.go /27_code-in-process/54_AJAX/01/test.html: -------------------------------------------------------------------------------- 1 | I'm a test. -------------------------------------------------------------------------------- /27_code-in-process/27_package-os/01_Read/01/dst.txt: -------------------------------------------------------------------------------- 1 | ABCDE -------------------------------------------------------------------------------- /27_code-in-process/30_package-io/05_ReadFull/dst.txt: -------------------------------------------------------------------------------- 1 | ABCDE -------------------------------------------------------------------------------- /27_code-in-process/30_package-io/04_TeeReader/01/src.txt: -------------------------------------------------------------------------------- 1 | TEST -------------------------------------------------------------------------------- /27_code-in-process/30_package-io/04_TeeReader/02/src.txt: -------------------------------------------------------------------------------- 1 | TEST -------------------------------------------------------------------------------- /04_scope/05_same-package/same.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | var x = 7 4 | -------------------------------------------------------------------------------- /27_code-in-process/57_appengine-channel/02_chat-room/public/main.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GolangTraining 2 | Training for Golang (go language) 3 | -------------------------------------------------------------------------------- /27_code-in-process/38_JSON/12/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "returns": [1,2,3,4] 3 | } -------------------------------------------------------------------------------- /27_code-in-process/38_JSON/13/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "returns": [1,2,3,4] 3 | } -------------------------------------------------------------------------------- /27_code-in-process/27_package-os/01_Read/01/src.txt: -------------------------------------------------------------------------------- 1 | ABCDEFGHIJKLMNOPQRSTUVWXYZ -------------------------------------------------------------------------------- /27_code-in-process/27_package-os/02_Write/02/hello.txt: -------------------------------------------------------------------------------- 1 | Put some phrase here. -------------------------------------------------------------------------------- /27_code-in-process/30_package-io/05_ReadFull/src.txt: -------------------------------------------------------------------------------- 1 | ABCDEFGHIJKLMNOPQRSTUVWXYZ -------------------------------------------------------------------------------- /27_code-in-process/30_package-io/06_LimitReader/src.txt: -------------------------------------------------------------------------------- 1 | ABCDEFGHIJKLMNOPQRSTUVWXYZ -------------------------------------------------------------------------------- /27_code-in-process/31_package-ioutil/03_ReadAll_WriteFile/hey.txt: -------------------------------------------------------------------------------- 1 | Hello Everybody -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week6/7-polymer/3-properties/1-index.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week6/7-polymer/4-local-dom/1-index.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week7/my-cat/hello.txt: -------------------------------------------------------------------------------- 1 | Hello World 2 | -------------------------------------------------------------------------------- /26_QUESTIONS-FROM-STUDENTS/01-package-scope/variables.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | var x = 7 4 | -------------------------------------------------------------------------------- /27_code-in-process/30_package-io/07_WriteString/01_one-way/hello.txt: -------------------------------------------------------------------------------- 1 | Put some phrase here. -------------------------------------------------------------------------------- /27_code-in-process/30_package-io/07_WriteString/02_another-way/hello.txt: -------------------------------------------------------------------------------- 1 | Put some phrase here. -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week6/2-browser-devtools/zordpress/js/save.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week6/7-polymer/3-properties/1-polymer.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week6/7-polymer/4-local-dom/1-polymer.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week6/7-polymer/5-data-binding/1-index.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week6/7-polymer/5-data-binding/1-polymer.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week6/7-polymer/5-data-binding/2-index.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week6/7-polymer/5-data-binding/2-polymer.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week8/json-example/data.json: -------------------------------------------------------------------------------- 1 | [1,2,3,4] 2 | -------------------------------------------------------------------------------- /27_code-in-process/37_review-exercises/08_cp/01/initial.txt: -------------------------------------------------------------------------------- 1 | this is the starting text in the file -------------------------------------------------------------------------------- /27_code-in-process/37_review-exercises/08_cp/02/initial.txt: -------------------------------------------------------------------------------- 1 | this is the starting text in the file -------------------------------------------------------------------------------- /27_code-in-process/37_review-exercises/08_cp/03/initial.txt: -------------------------------------------------------------------------------- 1 | this is the starting text in the file -------------------------------------------------------------------------------- /27_code-in-process/67_digital-ocean_aerospike/02_fullsite/.gitignore: -------------------------------------------------------------------------------- 1 | users.json 2 | logfile.txt -------------------------------------------------------------------------------- /27_code-in-process/37_review-exercises/08_cp/04_io-copy/initial.txt: -------------------------------------------------------------------------------- 1 | this is the starting text in the file -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/05_document/templates/html/footer.html: -------------------------------------------------------------------------------- 1 | {{ define "footer" }} 2 | {{ end }} -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/06_document/templates/html/footer.html: -------------------------------------------------------------------------------- 1 | {{ define "footer" }} 2 | {{ end }} -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/11_HTTPS-TLS/templates/html/footer.html: -------------------------------------------------------------------------------- 1 | {{ define "footer" }} 2 | {{ end }} -------------------------------------------------------------------------------- /27_code-in-process/37_review-exercises/08_cp/07_io-copy_bufio-NewReader/initial.txt: -------------------------------------------------------------------------------- 1 | this is the starting text in the file -------------------------------------------------------------------------------- /27_code-in-process/37_review-exercises/16_csv_stock-prices/step03_charting/charting_graphing.txt: -------------------------------------------------------------------------------- 1 | http://www.highcharts.com/ -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/07_app-engine/templates/html/footer.html: -------------------------------------------------------------------------------- 1 | {{ define "footer" }} 2 | {{ end }} -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/08_julien-schmidt/templates/html/footer.html: -------------------------------------------------------------------------------- 1 | {{ define "footer" }} 2 | {{ end }} -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/09_login-form/templates/html/footer.html: -------------------------------------------------------------------------------- 1 | {{ define "footer" }} 2 | {{ end }} -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/12_error-handling/templates/html/footer.html: -------------------------------------------------------------------------------- 1 | {{ define "footer" }} 2 | {{ end }} -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week7/capitalize/test.txt: -------------------------------------------------------------------------------- 1 | this is a line 2 | line two 3 | another line 4 | -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/13_login_unfinished/templates/html/footer.html: -------------------------------------------------------------------------------- 1 | {{ define "footer" }} 2 | {{ end }} -------------------------------------------------------------------------------- /27_code-in-process/97_temp/02/02: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/97_temp/02/02 -------------------------------------------------------------------------------- /27_code-in-process/50_exif/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/50_exif/01.jpg -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/04_template_abstraction/templates/html/footer.html: -------------------------------------------------------------------------------- 1 | {{ define "footer" }} 2 | {{ end }} -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week5/web-components-training-exercises/README.md: -------------------------------------------------------------------------------- 1 | # Web Components Training Exercsies 2 | -------------------------------------------------------------------------------- /01_getting-started/01_helloWorld/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | fmt.Println("Hello world!") 7 | } 8 | -------------------------------------------------------------------------------- /23_error-handling/02_err-not-nil/03_log-set-output/log.txt: -------------------------------------------------------------------------------- 1 | 2016/02/17 04:35:28 err happened open no-file.txt: no such file or directory 2 | -------------------------------------------------------------------------------- /26_QUESTIONS-FROM-STUDENTS/01-package-scope/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | fmt.Println(x) 7 | } 8 | -------------------------------------------------------------------------------- /27_code-in-process/39_packages/hello/hello.go: -------------------------------------------------------------------------------- 1 | package hello 2 | 3 | import "fmt" 4 | 5 | func Hello() { 6 | fmt.Println("Hello") 7 | } 8 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | All material is licensed under the Apache License Version 2.0, January 2004 2 | http://www.apache.org/licenses/LICENSE-2.0 3 | -------------------------------------------------------------------------------- /01_getting-started/02_numeral-systems/01_decimal/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | fmt.Println(42) 7 | } 8 | -------------------------------------------------------------------------------- /13_exercise-solutions/01_hello-world/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | fmt.Println("Hello World") 7 | } 8 | -------------------------------------------------------------------------------- /13_exercise-solutions/08_just-fyi/03_utf/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | fmt.Println("Hello"[1]) 7 | } 8 | -------------------------------------------------------------------------------- /27_code-in-process/41_TCP/03_dial/00_notes.txt: -------------------------------------------------------------------------------- 1 | start the file in 02_listen (go run main.go) 2 | 3 | then run the main.go file in this folder 4 | -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/10_signup-form-validate/02v_datastore-put/templates/html/footer.html: -------------------------------------------------------------------------------- 1 | {{ define "footer" }} 2 | {{ end }} -------------------------------------------------------------------------------- /27_code-in-process/66_authentication_OAUTH/02_manual-auth/04_bcrypt/01/README.txt: -------------------------------------------------------------------------------- 1 | https://godoc.org/golang.org/x/crypto/bcrypt#GenerateFromPassword -------------------------------------------------------------------------------- /02_package/stringutil/name.go: -------------------------------------------------------------------------------- 1 | package stringutil 2 | 3 | // MyName will be exported because it starts with a capital letter. 4 | var MyName = "Todd" 5 | -------------------------------------------------------------------------------- /27_code-in-process/42_HTTP/01_header/00_notes.txt: -------------------------------------------------------------------------------- 1 | 2 | start main.go (go run main.go) then ... 3 | go to your browser and go to localhost:9000 4 | 5 | -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/10_signup-form-validate/01v_form-validation/templates/html/footer.html: -------------------------------------------------------------------------------- 1 | {{ define "footer" }} 2 | {{ end }} -------------------------------------------------------------------------------- /27_code-in-process/60_movie-website/01_search/types.go: -------------------------------------------------------------------------------- 1 | package movieinfo 2 | 3 | type Movie struct { 4 | Title string 5 | Summary string 6 | } 7 | -------------------------------------------------------------------------------- /27_code-in-process/45_serving-files/02/toby.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/45_serving-files/02/toby.jpg -------------------------------------------------------------------------------- /27_code-in-process/45_serving-files/03/toby.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/45_serving-files/03/toby.jpg -------------------------------------------------------------------------------- /01_getting-started/02_numeral-systems/02_binary/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | fmt.Printf("%d - %b \n", 42, 42) 7 | } 8 | -------------------------------------------------------------------------------- /02_package/icomefromalaska/name2.go: -------------------------------------------------------------------------------- 1 | package winniepooh 2 | 3 | // MyName will be exported because it starts with a capital letter. 4 | var BearName = "Pooh" 5 | -------------------------------------------------------------------------------- /13_exercise-solutions/02_hello-NAME/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | name := "Todd" 7 | fmt.Println("Hello", name) 8 | } 9 | -------------------------------------------------------------------------------- /27_code-in-process/46_errata/05_ServeFile/toby.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/46_errata/05_ServeFile/toby.jpg -------------------------------------------------------------------------------- /24_testing/math.go: -------------------------------------------------------------------------------- 1 | package math 2 | 3 | func Adder(xs ...int) int { 4 | res := 0 5 | for _, v := range xs { 6 | res += v 7 | } 8 | return res 9 | } 10 | -------------------------------------------------------------------------------- /27_code-in-process/68_task-queue/02_delay-cron/cron.yaml: -------------------------------------------------------------------------------- 1 | cron: 2 | - description: daily summary job 3 | url: /schedule-example 4 | schedule: every 1 minutes 5 | -------------------------------------------------------------------------------- /27_code-in-process/68_task-queue/05_github-cron/cron.yaml: -------------------------------------------------------------------------------- 1 | cron: 2 | - description: daily summary job 3 | url: /schedule-example 4 | schedule: every 1 minutes 5 | -------------------------------------------------------------------------------- /27_code-in-process/26_playing-with-type/00_types/01_division/01_int-int/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | fmt.Println(32 / 16) 7 | } 8 | -------------------------------------------------------------------------------- /27_code-in-process/45_serving-files/04_io-Copy/toby.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/45_serving-files/04_io-Copy/toby.jpg -------------------------------------------------------------------------------- /14_functions/16_anon_self-executing/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | func() { 7 | fmt.Println("I'm driving!") 8 | }() 9 | } 10 | -------------------------------------------------------------------------------- /15_bool-expressions/03_or/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | 7 | if true || false { 8 | fmt.Println("This ran") 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /27_code-in-process/26_playing-with-type/00_types/01_division/02_int-float/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | fmt.Println(32 / 3.74) 7 | } 8 | -------------------------------------------------------------------------------- /27_code-in-process/45_serving-files/06_ServeFile/toby.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/45_serving-files/06_ServeFile/toby.jpg -------------------------------------------------------------------------------- /10_for-loop/01_init-condition-post/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | for i := 0; i <= 100; i++ { 7 | fmt.Println(i) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /10_for-loop/04_for_no-condition/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | i := 0 7 | for { 8 | fmt.Println(i) 9 | i++ 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /27_code-in-process/34_package-time/01_now/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "time" 6 | ) 7 | 8 | func main() { 9 | fmt.Println(time.Now()) 10 | } 11 | -------------------------------------------------------------------------------- /27_code-in-process/45_serving-files/05_ServeContent/toby.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/45_serving-files/05_ServeContent/toby.jpg -------------------------------------------------------------------------------- /27_code-in-process/45_serving-files/07_FileServer/toby.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/45_serving-files/07_FileServer/toby.jpg -------------------------------------------------------------------------------- /27_code-in-process/61_http-giffy/app.yaml: -------------------------------------------------------------------------------- 1 | application: learning-1130 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/99_svcc/26_serving-files_io-Copy/toby.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/99_svcc/26_serving-files_io-Copy/toby.jpg -------------------------------------------------------------------------------- /27_code-in-process/99_svcc/44_file-paths/assets/imgs/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/99_svcc/44_file-paths/assets/imgs/01.jpg -------------------------------------------------------------------------------- /04_scope/03_order-matters/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | fmt.Println(x) 7 | fmt.Println(y) 8 | x := 42 9 | } 10 | 11 | var y = 42 12 | -------------------------------------------------------------------------------- /27_code-in-process/26_playing-with-type/00_types/02_strings/04_len/01_len-english/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | fmt.Println(len("hello")) 7 | } 8 | -------------------------------------------------------------------------------- /27_code-in-process/26_playing-with-type/00_types/02_strings/04_len/02_len-chinese/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | fmt.Println(len("世界")) 7 | } 8 | -------------------------------------------------------------------------------- /27_code-in-process/58_appengine-search/app.yaml: -------------------------------------------------------------------------------- 1 | application: photoblog-1008 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/63_GCS-filebrowser/app.yaml: -------------------------------------------------------------------------------- 1 | application: learning-1130 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/64_csv-example/01/app.yaml: -------------------------------------------------------------------------------- 1 | application: learning-1130 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/64_csv-example/02/app.yaml: -------------------------------------------------------------------------------- 1 | application: learning-1130 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/66_authentication_OAUTH/03_oauth-github/06-complete/cron.yaml: -------------------------------------------------------------------------------- 1 | cron: 2 | - description: daily summary job 3 | url: /schedule-example 4 | schedule: every 1 minutes 5 | -------------------------------------------------------------------------------- /27_code-in-process/99_svcc/28_serving-files_ServeFile/toby.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/99_svcc/28_serving-files_ServeFile/toby.jpg -------------------------------------------------------------------------------- /14_functions/01_main/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | fmt.Println("Hello world!") 7 | } 8 | 9 | // main is the entry point to your program 10 | -------------------------------------------------------------------------------- /15_bool-expressions/04_and/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | 7 | if true && false { 8 | fmt.Println("This did not run") 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /16_exercise-solutions/04_bool-expression/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | fmt.Println((true && false) || (false && true) || !(false && false)) 7 | } 8 | -------------------------------------------------------------------------------- /27_code-in-process/45_serving-files/08_FileServer/assets/toby.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/45_serving-files/08_FileServer/assets/toby.jpg -------------------------------------------------------------------------------- /27_code-in-process/45_serving-files/09_FileServer/assets/toby.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/45_serving-files/09_FileServer/assets/toby.jpg -------------------------------------------------------------------------------- /27_code-in-process/53_datastore/02/02/app.yaml: -------------------------------------------------------------------------------- 1 | application: astute-curve-100822 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/60_movie-website/01_search/app.yaml: -------------------------------------------------------------------------------- 1 | application: learning-1130 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/68_task-queue/01_delay/app.yaml: -------------------------------------------------------------------------------- 1 | application: learning-1130 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/68_task-queue/03_github/app.yaml: -------------------------------------------------------------------------------- 1 | application: learning-1130 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/99_svcc/27_serving-files_ServeContent/toby.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/99_svcc/27_serving-files_ServeContent/toby.jpg -------------------------------------------------------------------------------- /27_code-in-process/99_svcc/29_serving-files_FileServer/toby.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/99_svcc/29_serving-files_FileServer/toby.jpg -------------------------------------------------------------------------------- /10_for-loop/03_for-condition-while-ish/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | i := 0 7 | for i < 10 { 8 | fmt.Println(i) 9 | i++ 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /19_map/14_hash-table/01_letter-buckets/02_strings-to-rune-conversion/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | letter := rune("A"[0]) 7 | fmt.Println(letter) 8 | } 9 | -------------------------------------------------------------------------------- /27_code-in-process/41_TCP/02_listen/00_notes.txt: -------------------------------------------------------------------------------- 1 | on windows you can install telnet 2 | on Mac, should be there 3 | 4 | start main.go (go run main.go) then ... 5 | telnet localhost 9000 6 | 7 | -------------------------------------------------------------------------------- /27_code-in-process/52_memcache/01_get-nil/app.yaml: -------------------------------------------------------------------------------- 1 | application: astute-curve-100822 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/52_memcache/02_set_get/app.yaml: -------------------------------------------------------------------------------- 1 | application: astute-curve-100822 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/52_memcache/03_expiration/app.yaml: -------------------------------------------------------------------------------- 1 | application: astute-curve-100822 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/53_datastore/02/01_put/app.yaml: -------------------------------------------------------------------------------- 1 | application: astute-curve-100822 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/53_datastore/02/03_get/app.yaml: -------------------------------------------------------------------------------- 1 | application: astute-curve-100822 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/18_abstract-API-Model/Model/users.go: -------------------------------------------------------------------------------- 1 | package Model 2 | 3 | type User struct { 4 | Email string 5 | UserName string `datastore:"-"` 6 | Password string 7 | } 8 | -------------------------------------------------------------------------------- /27_code-in-process/57_appengine-channel/01_basic/app.yaml: -------------------------------------------------------------------------------- 1 | application: photoblog-1008 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/62_self-destructing-message/01/app.yaml: -------------------------------------------------------------------------------- 1 | application: learning-1130 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/68_task-queue/02_delay-cron/app.yaml: -------------------------------------------------------------------------------- 1 | application: learning-1130 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/68_task-queue/05_github-cron/app.yaml: -------------------------------------------------------------------------------- 1 | application: learning-1130 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week1/google/mic.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week1/google/mic.gif -------------------------------------------------------------------------------- /27_code-in-process/26_playing-with-type/00_types/01_division/03_var_int-float/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | answer := 32 / 3.74 7 | fmt.Println(answer) 8 | } 9 | -------------------------------------------------------------------------------- /27_code-in-process/26_playing-with-type/00_types/02_strings/01_escape-sequences/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | fmt.Println("Hello\tWorld\nHow are you?") 7 | } 8 | -------------------------------------------------------------------------------- /27_code-in-process/41_TCP/04_echo-server/v01/00_notes.txt: -------------------------------------------------------------------------------- 1 | on windows you can install telnet 2 | on Mac, should be there 3 | 4 | start main.go (go run main.go) then ... 5 | telnet localhost 9000 6 | 7 | -------------------------------------------------------------------------------- /27_code-in-process/41_TCP/04_echo-server/v02/00_notes.txt: -------------------------------------------------------------------------------- 1 | on windows you can install telnet 2 | on Mac, should be there 3 | 4 | start main.go (go run main.go) then ... 5 | telnet localhost 9000 6 | 7 | -------------------------------------------------------------------------------- /27_code-in-process/51_appengine-introduction/01_hello-world/app.yaml: -------------------------------------------------------------------------------- 1 | application: helloworld 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app -------------------------------------------------------------------------------- /27_code-in-process/60_movie-website/02_image-upload-GCS/app.yaml: -------------------------------------------------------------------------------- 1 | application: learning-1130 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/65_accepting-credit-cards/05_charging/minions.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/65_accepting-credit-cards/05_charging/minions.jpg -------------------------------------------------------------------------------- /27_code-in-process/65_accepting-credit-cards/06_idempotent/minions.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/65_accepting-credit-cards/06_idempotent/minions.jpg -------------------------------------------------------------------------------- /27_code-in-process/65_accepting-credit-cards/07_complete/minions.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/65_accepting-credit-cards/07_complete/minions.jpg -------------------------------------------------------------------------------- /27_code-in-process/68_task-queue/04_github-goroutines/app.yaml: -------------------------------------------------------------------------------- 1 | application: learning-1130 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/99_svcc/30_serving-files_FileServer/assets/toby.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/99_svcc/30_serving-files_FileServer/assets/toby.jpg -------------------------------------------------------------------------------- /27_code-in-process/99_svcc/31_serving-files_FileServer/assets/toby.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/99_svcc/31_serving-files_FileServer/assets/toby.jpg -------------------------------------------------------------------------------- /03_variables/03_less-emphasis/08_exercise_your-name/02_anotherSolution/myNameVar.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | var name = "Todd" 7 | fmt.Println("Hello ", name) 8 | } 9 | -------------------------------------------------------------------------------- /03_variables/03_less-emphasis/08_exercise_your-name/03_anotherSolution/myNameVar.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | name := "Todd" 7 | fmt.Println("Hello ", name) 8 | } 9 | -------------------------------------------------------------------------------- /27_code-in-process/41_TCP/05_redis-clone/i01/i01_notes.txt: -------------------------------------------------------------------------------- 1 | on windows you can install telnet 2 | on Mac, should be there 3 | 4 | start main.go (go run main.go) then ... 5 | telnet localhost 9000 6 | 7 | -------------------------------------------------------------------------------- /27_code-in-process/52_memcache/05_memcache-session/01i/app.yaml: -------------------------------------------------------------------------------- 1 | application: astute-curve-100822 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/52_memcache/05_memcache-session/02i/app.yaml: -------------------------------------------------------------------------------- 1 | application: astute-curve-100822 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/52_memcache/05_memcache-session/03i/app.yaml: -------------------------------------------------------------------------------- 1 | application: astute-curve-100822 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/52_memcache/05_memcache-session/04i/app.yaml: -------------------------------------------------------------------------------- 1 | application: astute-curve-100822 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/52_memcache/05_memcache-session/05i/app.yaml: -------------------------------------------------------------------------------- 1 | application: astute-curve-100822 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/53_datastore/02/04_query-filter/app.yaml: -------------------------------------------------------------------------------- 1 | application: astute-curve-100822 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/53_datastore/02/05_query-ancestor/app.yaml: -------------------------------------------------------------------------------- 1 | application: astute-curve-100822 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/07_app-engine/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | 10 | -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/09_login-form/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | 10 | -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/19_abstract-API-Model_AE-fix/Model/users.go: -------------------------------------------------------------------------------- 1 | package Model 2 | 3 | type User struct { 4 | Email string 5 | UserName string `datastore:"-"` 6 | Password string 7 | } 8 | -------------------------------------------------------------------------------- /27_code-in-process/65_accepting-credit-cards/01_basic-setup/app.yaml: -------------------------------------------------------------------------------- 1 | application: learning-1130 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/65_accepting-credit-cards/03_stripe-token/minions.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/65_accepting-credit-cards/03_stripe-token/minions.jpg -------------------------------------------------------------------------------- /27_code-in-process/66_authentication_OAUTH/03_oauth-github/05_configuration_scheduled-tasks_cron/cron.yaml: -------------------------------------------------------------------------------- 1 | cron: 2 | - description: daily summary job 3 | url: /scheduled 4 | schedule: every 1 minutes 5 | -------------------------------------------------------------------------------- /01_getting-started/03_UTF-8/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | for i := 60; i < 122; i++ { 7 | fmt.Printf("%d \t %b \t %x \t %q \n", i, i, i, i) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /04_scope/01_package-scope/02_visibility/vis/name.go: -------------------------------------------------------------------------------- 1 | package vis 2 | 3 | // MyName is exported because it starts with a capital letter 4 | var MyName = "Todd" 5 | var yourName = "Future Rock Star Programmer" 6 | -------------------------------------------------------------------------------- /18_slice/01_int-slice/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | 7 | mySlice := []int{1, 3, 5, 7, 9, 11} 8 | fmt.Printf("%T\n", mySlice) 9 | fmt.Println(mySlice) 10 | } 11 | -------------------------------------------------------------------------------- /21_interfaces/05_conversion-vs-assertion/02_assertion/06_interface-int-sum/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | var val interface{} = 7 7 | fmt.Println(val.(int) + 6) 8 | } 9 | -------------------------------------------------------------------------------- /27_code-in-process/51_appengine-introduction/05_GORILLA_photo-blog/app.yaml: -------------------------------------------------------------------------------- 1 | application: photoblog-1008 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/08_julien-schmidt/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | 10 | -------------------------------------------------------------------------------- /27_code-in-process/59_appengine-GCS-storage/01_NewWriter_PEM-auth/app.yaml: -------------------------------------------------------------------------------- 1 | application: learning-1130 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/65_accepting-credit-cards/02_customizing_UI/minions.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/65_accepting-credit-cards/02_customizing_UI/minions.jpg -------------------------------------------------------------------------------- /27_code-in-process/65_accepting-credit-cards/05_charging/app.yaml: -------------------------------------------------------------------------------- 1 | application: astute-curve-100822 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/65_accepting-credit-cards/06_idempotent/app.yaml: -------------------------------------------------------------------------------- 1 | application: astute-curve-100822 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/65_accepting-credit-cards/07_complete/app.yaml: -------------------------------------------------------------------------------- 1 | application: astute-curve-100822 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week8/static-http/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "net/http" 4 | 5 | func main() { 6 | http.ListenAndServe(":9000", http.FileServer(http.Dir("."))) 7 | } 8 | -------------------------------------------------------------------------------- /27_code-in-process/99_svcc/32_static-FileServer/assets/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/99_svcc/32_static-FileServer/assets/images/favicon.ico -------------------------------------------------------------------------------- /03_variables/03_less-emphasis/01_declare-variable/var.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | var message string 7 | message = "Hello World." 8 | fmt.Println(message) 9 | } 10 | -------------------------------------------------------------------------------- /03_variables/03_less-emphasis/08_exercise_your-name/01_oneSolution/myNameVar.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | var name = "Todd" 6 | 7 | func main() { 8 | fmt.Println("Hello ", name) 9 | } 10 | -------------------------------------------------------------------------------- /04_scope/01_package-scope/01/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | var x = 42 6 | 7 | func main() { 8 | fmt.Println(x) 9 | foo() 10 | } 11 | 12 | func foo() { 13 | fmt.Println(x) 14 | } 15 | -------------------------------------------------------------------------------- /10_for-loop/02_nested/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | for i := 0; i < 5; i++ { 7 | for j := 0; j < 5; j++ { 8 | fmt.Println(i, " - ", j) 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /10_for-loop/05_for_break/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | i := 0 7 | for { 8 | fmt.Println(i) 9 | if i >= 10 { 10 | break 11 | } 12 | i++ 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /12_if_else-if_else/08_divisibleByThree/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | for i := 0; i <= 100; i++ { 7 | if i%3 == 0 { 8 | fmt.Println(i) 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /13_exercise-solutions/05_even-numbers/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | for i := 0; i <= 100; i++ { 7 | if i%2 == 0 { 8 | fmt.Println(i) 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /21_interfaces/05_conversion-vs-assertion/02_assertion/04_interface-int_print-type/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | var val interface{} = 7 7 | fmt.Printf("%T\n", val) 8 | } 9 | -------------------------------------------------------------------------------- /27_code-in-process/51_appengine-introduction/03_google-maps-api/app.yaml: -------------------------------------------------------------------------------- 1 | application: astute-curve-100822 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/59_appengine-GCS-storage/02_NewWriter_JSON-auth/app.yaml: -------------------------------------------------------------------------------- 1 | application: learning-1130 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/59_appengine-GCS-storage/03_put-get-list_JSON-auth/app.yaml: -------------------------------------------------------------------------------- 1 | application: learning-1130 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/62_self-destructing-message/02_crypto/04_complete/app.yaml: -------------------------------------------------------------------------------- 1 | application: learning-1130 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/65_accepting-credit-cards/02_customizing_UI/app.yaml: -------------------------------------------------------------------------------- 1 | application: astute-curve-100822 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/65_accepting-credit-cards/03_stripe-token/app.yaml: -------------------------------------------------------------------------------- 1 | application: astute-curve-100822 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/66_authentication_OAUTH/03_oauth-github/06-complete/app.yaml: -------------------------------------------------------------------------------- 1 | application: learning-1130 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/99_svcc/32_static-FileServer/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "net/http" 5 | ) 6 | 7 | func main() { 8 | http.ListenAndServe(":9000", http.FileServer(http.Dir("."))) 9 | } 10 | -------------------------------------------------------------------------------- /27_code-in-process/99_svcc/45_sessions_GORILLA_photo-blog/assets/imgs/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/99_svcc/45_sessions_GORILLA_photo-blog/assets/imgs/01.jpg -------------------------------------------------------------------------------- /12_if_else-if_else/03_init-statement/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | 7 | b := true 8 | 9 | if food := "Chocolate"; b { 10 | fmt.Println(food) 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /14_functions/03_two-params/02/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | greet("Jane", "Doe") 7 | } 8 | 9 | func greet(fname, lname string) { 10 | fmt.Println(fname, lname) 11 | } 12 | -------------------------------------------------------------------------------- /19_map/14_hash-table/01_letter-buckets/01_runes-are-numbers/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | letter := 'A' 7 | fmt.Println(letter) 8 | fmt.Printf("%T \n", letter) 9 | } 10 | -------------------------------------------------------------------------------- /19_map/14_hash-table/01_letter-buckets/03_string-index-access/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | word := "Hello" 7 | letter := rune(word[0]) 8 | fmt.Println(letter) 9 | } 10 | -------------------------------------------------------------------------------- /27_code-in-process/39_packages/main/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "github.com/GoesToEleven/SummerBootCamp/05_golang/02/01/07_packages/hello" 4 | 5 | func main() { 6 | hello.Hello() 7 | hello.ByeBye() 8 | } 9 | -------------------------------------------------------------------------------- /27_code-in-process/49_cookies-sessions/12_GORILLA_photo-blog/assets/imgs/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/49_cookies-sessions/12_GORILLA_photo-blog/assets/imgs/01.jpg -------------------------------------------------------------------------------- /27_code-in-process/52_memcache/05_memcache-session/06_photo-blog_UNFINISHED/app.yaml: -------------------------------------------------------------------------------- 1 | application: photoblog-1008 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/40_send-email/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | login: required 10 | -------------------------------------------------------------------------------- /27_code-in-process/66_authentication_OAUTH/03_oauth-github/02_access-token/app.yaml: -------------------------------------------------------------------------------- 1 | application: learning-1130 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/66_authentication_OAUTH/03_oauth-github/04_user-email/app.yaml: -------------------------------------------------------------------------------- 1 | application: learning-1130 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week2/destructButton/zombie.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week2/destructButton/zombie.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week9/storageExample/app.yaml: -------------------------------------------------------------------------------- 1 | application: astute-curve-100822 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/99_svcc/32_static-FileServer/assets/images/home/speakers.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/99_svcc/32_static-FileServer/assets/images/home/speakers.jpg -------------------------------------------------------------------------------- /01_getting-started/02_numeral-systems/04_loop/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | for i := 1000000; i < 1000100; i++ { 7 | fmt.Printf("%d \t %b \t %x \n", i, i, i) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /10_for-loop/07_rune-loop_UTF8/02/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | for i := 50; i <= 140; i++ { 7 | fmt.Printf("%v - %v - %v \n", i, string(i), []byte(string(i))) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /14_functions/10_func-expression/01_before-func-expression/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func greeting() { 6 | fmt.Println("Hello world!") 7 | } 8 | 9 | func main() { 10 | greeting() 11 | } 12 | -------------------------------------------------------------------------------- /21_interfaces/02_package-sort/07_sort-Ints/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "sort" 6 | ) 7 | 8 | func main() { 9 | n := []int{5, 2, 6, 3, 1, 4} 10 | sort.Ints(n) 11 | fmt.Println(n) 12 | } 13 | -------------------------------------------------------------------------------- /21_interfaces/05_conversion-vs-assertion/02_assertion/05_interface-int_mistmatched-types-error/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | var val interface{} = 7 7 | fmt.Println(val + 6) 8 | } 9 | -------------------------------------------------------------------------------- /27_code-in-process/45_serving-files/10_static-file-server/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "net/http" 5 | ) 6 | 7 | func main() { 8 | http.ListenAndServe(":9000", http.FileServer(http.Dir("."))) 9 | } 10 | -------------------------------------------------------------------------------- /27_code-in-process/51_appengine-introduction/02_photo-blog_somewhat-crappy-code-FYI/app.yaml: -------------------------------------------------------------------------------- 1 | application: photoblog-1008 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app -------------------------------------------------------------------------------- /27_code-in-process/55_todo-list/02v_input/app.yaml: -------------------------------------------------------------------------------- 1 | application: astute-curve-100822 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | login: required 10 | -------------------------------------------------------------------------------- /27_code-in-process/65_accepting-credit-cards/04_err-because-of-app-engine/app.yaml: -------------------------------------------------------------------------------- 1 | application: astute-curve-100822 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/66_authentication_OAUTH/03_oauth-github/01_authorization-code/app.yaml: -------------------------------------------------------------------------------- 1 | application: learning-1130 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/66_authentication_OAUTH/03_oauth-github/03_url-ParseQuery/app.yaml: -------------------------------------------------------------------------------- 1 | application: learning-1130 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Xhou_Ta.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Xhou_Ta.jpg -------------------------------------------------------------------------------- /14_functions/03_two-params/01/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | greet("Jane", "Doe") 7 | } 8 | 9 | func greet(fname string, lname string) { 10 | fmt.Println(fname, lname) 11 | } 12 | -------------------------------------------------------------------------------- /14_functions/10_func-expression/02_func-expression/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | 7 | greeting := func() { 8 | fmt.Println("Hello world!") 9 | } 10 | 11 | greeting() 12 | } 13 | -------------------------------------------------------------------------------- /17_array/01/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | var x [58]int 7 | fmt.Println(x) 8 | fmt.Println(len(x)) 9 | fmt.Println(x[42]) 10 | x[42] = 777 11 | fmt.Println(x[42]) 12 | } 13 | -------------------------------------------------------------------------------- /22_go-routines/15_for-fun/README.md: -------------------------------------------------------------------------------- 1 | # New Code 2 | 3 | These files were added into this repo after the training was recorded. 4 | 5 | There are no lectures associated with these files. However, please peruse them and enjoy them! -------------------------------------------------------------------------------- /27_code-in-process/30_package-io/01_copy/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "io" 5 | "os" 6 | "strings" 7 | ) 8 | 9 | func main() { 10 | rdr := strings.NewReader("test") 11 | io.Copy(os.Stdout, rdr) 12 | } 13 | -------------------------------------------------------------------------------- /27_code-in-process/40_testing/01/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/GoesToEleven/SummerBootCamp/05_golang/02/01/13_01_testing/example" 5 | ) 6 | 7 | func main() { 8 | example.Sum(7, 5, 3, 1) 9 | } 10 | -------------------------------------------------------------------------------- /27_code-in-process/40_testing/02/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/GoesToEleven/SummerBootCamp/05_golang/02/01/13_02_testing/example" 5 | ) 6 | 7 | func main() { 8 | example.Sum(7, 5, 3, 1) 9 | } 10 | -------------------------------------------------------------------------------- /27_code-in-process/51_appengine-introduction/05_GORILLA_photo-blog/assets/imgs/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/51_appengine-introduction/05_GORILLA_photo-blog/assets/imgs/01.jpg -------------------------------------------------------------------------------- /27_code-in-process/52_memcache/04_increment/app.yaml: -------------------------------------------------------------------------------- 1 | application: astute-curve-100822 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | login: required 10 | -------------------------------------------------------------------------------- /27_code-in-process/53_datastore/00_appengine-documentation-example/03_no-favicon/app.yaml: -------------------------------------------------------------------------------- 1 | application: photoblog-1008 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/53_datastore/00_appengine-documentation-example/04_no-favicon/app.yaml: -------------------------------------------------------------------------------- 1 | application: photoblog-1008 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/57_appengine-channel/02_chat-room/app.yaml: -------------------------------------------------------------------------------- 1 | application: photoblog-1008 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | login: required 10 | -------------------------------------------------------------------------------- /27_code-in-process/65_accepting-credit-cards/04_err-because-of-app-engine/minions.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/65_accepting-credit-cards/04_err-because-of-app-engine/minions.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Xhou_Ta_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Xhou_Ta_tn.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week6/3-html5/7-progress/progress.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week6/3-html5/7-progress/progress.gif -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week8/firstTemplate/tpl.gohtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {{ . }} 8 | 9 | 10 | -------------------------------------------------------------------------------- /27_code-in-process/99_svcc/32_static-FileServer/assets/images/home/ray_villalobos.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/99_svcc/32_static-FileServer/assets/images/home/ray_villalobos.jpg -------------------------------------------------------------------------------- /03_variables/03_less-emphasis/04_infer-type/var.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | 7 | var message = "Hello World!" 8 | var a, b, c = 1, 2, 3 9 | 10 | fmt.Println(message, a, b, c) 11 | } 12 | -------------------------------------------------------------------------------- /08_pointers/04_using-pointers/02_pointer/01/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func zero(z *int) { 6 | *z = 0 7 | } 8 | 9 | func main() { 10 | x := 5 11 | zero(&x) 12 | fmt.Println(x) // x is 0 13 | } 14 | -------------------------------------------------------------------------------- /18_slice/02_int-slice/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | 7 | xs := []int{1, 3, 5, 7, 9, 11} 8 | 9 | for i, value := range xs { 10 | fmt.Println(i, " - ", value) 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /27_code-in-process/53_datastore/00_appengine-documentation-example/01_with-modifications/app.yaml: -------------------------------------------------------------------------------- 1 | application: photoblog-1008 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/53_datastore/00_appengine-documentation-example/02_as-in-documentation/app.yaml: -------------------------------------------------------------------------------- 1 | application: photoblog-1008 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/55_todo-list/01v_content-editable/app.yaml: -------------------------------------------------------------------------------- 1 | application: astute-curve-100822 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | login: required 10 | -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/10_signup-form-validate/01v_form-validation/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | 10 | -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/10_signup-form-validate/02v_datastore-put/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | 10 | -------------------------------------------------------------------------------- /27_code-in-process/57_appengine-channel/02_chat-room/routes.go: -------------------------------------------------------------------------------- 1 | package chat 2 | 3 | import "net/http" 4 | 5 | func init() { 6 | http.Handle("/", http.FileServer(http.Dir("public/"))) 7 | http.Handle("/api/", NewAPI("/api/")) 8 | } 9 | -------------------------------------------------------------------------------- /27_code-in-process/66_authentication_OAUTH/05_oauth-google/app.yaml: -------------------------------------------------------------------------------- 1 | application: practical-scion-114602 2 | version: alpha-01 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | secure: always 9 | script: _go_app -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hassum_Harrod.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hassum_Harrod.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/LaVonne_LaRue.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/LaVonne_LaRue.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week6/2-browser-devtools/common/todd.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week6/2-browser-devtools/common/todd.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week6/2-browser-devtools/common/zeno.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week6/2-browser-devtools/common/zeno.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week6/7-polymer/1-registering/1-plain.html: -------------------------------------------------------------------------------- 1 | 5 | -------------------------------------------------------------------------------- /27_code-in-process/99_svcc/04_pipeline/tpl.gohtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 |

{{.}}

9 | 10 | -------------------------------------------------------------------------------- /03_variables/03_less-emphasis/08_exercise_your-name/04_anotherSolution/myNameVar.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | name := `Todd` // back-ticks work like double-quotes 7 | fmt.Println("Hello ", name) 8 | } 9 | -------------------------------------------------------------------------------- /05_blank-identifier/01_invalid-code/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | a := "stored in a" 7 | b := "stored in b" 8 | fmt.Println("a - ", a) 9 | // b is not being used - invalid code 10 | } 11 | -------------------------------------------------------------------------------- /06_constants/02_multiple-initialization/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | const ( 6 | pi = 3.14 7 | language = "Go" 8 | ) 9 | 10 | func main() { 11 | fmt.Println(pi) 12 | fmt.Println(language) 13 | } 14 | -------------------------------------------------------------------------------- /08_pointers/04_using-pointers/01_no-pointer/01/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func zero(z int) { 6 | z = 0 7 | } 8 | 9 | func main() { 10 | x := 5 11 | zero(x) 12 | fmt.Println(x) // x is still 5 13 | } 14 | -------------------------------------------------------------------------------- /14_functions/04_return/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | fmt.Println(greet("Jane ", "Doe")) 7 | } 8 | 9 | func greet(fname, lname string) string { 10 | return fmt.Sprint(fname, lname) 11 | } 12 | -------------------------------------------------------------------------------- /16_exercise-solutions/02_func-expression/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | 7 | half := func(n int) (int, bool) { 8 | return n / 2, n%2 == 0 9 | } 10 | 11 | fmt.Println(half(5)) 12 | } 13 | -------------------------------------------------------------------------------- /21_interfaces/05_conversion-vs-assertion/02_assertion/07_casting-reminder/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | rem := 7.24 7 | fmt.Printf("%T\n", rem) 8 | fmt.Printf("%T\n", int(rem)) 9 | } 10 | -------------------------------------------------------------------------------- /27_code-in-process/26_playing-with-type/00_types/02_strings/07_concatenation/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | fname := "James" 7 | lname := "Bond" 8 | fmt.Println(fname + " " + lname) 9 | } 10 | -------------------------------------------------------------------------------- /27_code-in-process/26_playing-with-type/00_types/03_strconv/02_fmt-sprint/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | var x int = 5 7 | str := "Hello world " + fmt.Sprint(x) 8 | fmt.Println(str) 9 | } 10 | -------------------------------------------------------------------------------- /27_code-in-process/26_playing-with-type/00_types/03_strconv/03_atoi/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "strconv" 6 | ) 7 | 8 | func main() { 9 | i, _ := strconv.Atoi("32") 10 | fmt.Println(i + 10) 11 | } 12 | -------------------------------------------------------------------------------- /27_code-in-process/47_templates/01_text-templates/08/tpl.gohtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ .Title }} 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /27_code-in-process/47_templates/x03_exercises/01/hw.gohtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 | Hello {{ . }} 9 | 10 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Barot_Bellingham.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Barot_Bellingham.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Constance_Smith.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Constance_Smith.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hassum_Harrod_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hassum_Harrod_tn.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hillary_Goldwynn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hillary_Goldwynn.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Jennifer_Jerome.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Jennifer_Jerome.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Jonathan_Ferrar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Jonathan_Ferrar.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/LaVonne_LaRue_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/LaVonne_LaRue_tn.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Riley_Rewington.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Riley_Rewington.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week6/2-browser-devtools/common/andrew.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week6/2-browser-devtools/common/andrew.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week6/2-browser-devtools/zlickr/img/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week6/2-browser-devtools/zlickr/img/1.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week6/2-browser-devtools/zlickr/img/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week6/2-browser-devtools/zlickr/img/2.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week6/2-browser-devtools/zlickr/img/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week6/2-browser-devtools/zlickr/img/3.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week6/2-browser-devtools/zlickr/img/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week6/2-browser-devtools/zlickr/img/4.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week6/2-browser-devtools/zlickr/img/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week6/2-browser-devtools/zlickr/img/5.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week6/2-browser-devtools/zlickr/img/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week6/2-browser-devtools/zlickr/img/6.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week6/2-browser-devtools/zlickr/img/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week6/2-browser-devtools/zlickr/img/7.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week6/2-browser-devtools/zlickr/img/8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week6/2-browser-devtools/zlickr/img/8.jpg -------------------------------------------------------------------------------- /27_code-in-process/99_svcc/03_text-template/tpl.gohtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 |

Hello

9 | 10 | -------------------------------------------------------------------------------- /03_variables/03_less-emphasis/03_init-many-at-once/var.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | 7 | var message = "Hello World!" 8 | var a, b, c int = 1, 2, 3 9 | 10 | fmt.Println(message, a, b, c) 11 | } 12 | -------------------------------------------------------------------------------- /12_if_else-if_else/01_eval-true/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | 7 | if true { 8 | fmt.Println("This ran") 9 | } 10 | 11 | if false { 12 | fmt.Println("This did not run") 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /13_exercise-solutions/03_hello-user-input/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | var name string 7 | fmt.Print("Please enter your name: ") 8 | fmt.Scan(&name) 9 | fmt.Println("Hello", name) 10 | } 11 | -------------------------------------------------------------------------------- /15_bool-expressions/01_true-false/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | 7 | if true { 8 | fmt.Println("This ran") 9 | } 10 | 11 | if false { 12 | fmt.Println("This did not run") 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /15_bool-expressions/02_not/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | 7 | if !true { 8 | fmt.Println("This did not run") 9 | } 10 | 11 | if !false { 12 | fmt.Println("This ran") 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /16_exercise-solutions/01_half/01/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func half(n int) (int, bool) { 6 | return n / 2, n%2 == 0 7 | } 8 | 9 | func main() { 10 | h, even := half(5) 11 | fmt.Println(h, even) 12 | } 13 | -------------------------------------------------------------------------------- /17_array/02/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | var x [58]string 7 | 8 | for i := 65; i <= 122; i++ { 9 | x[i-65] = string(i) 10 | } 11 | 12 | fmt.Println(x) 13 | fmt.Println(x[42]) 14 | } 15 | -------------------------------------------------------------------------------- /19_map/14_hash-table/01_letter-buckets/04_remainder-bucket-selection/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | for i := 65; i <= 122; i++ { 7 | fmt.Println(i, " - ", string(i), " - ", i%12) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /20_struct/01_user-defined-types/01_alias-type_not-idiomatic/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | type foo int 6 | 7 | func main() { 8 | var myAge foo 9 | myAge = 44 10 | fmt.Printf("%T %v \n", myAge, myAge) 11 | } 12 | -------------------------------------------------------------------------------- /22_go-routines/10_deadlock-challenges/02_deadlock-solution/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | func main() { 8 | c := make(chan int) 9 | go func() { 10 | c <- 1 11 | }() 12 | fmt.Println(<-c) 13 | } 14 | -------------------------------------------------------------------------------- /27_code-in-process/26_playing-with-type/00_types/01_division/04_var_int-float_invalid-code/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | var answer int 7 | answer = 32 / 3.74 8 | fmt.Println(answer) 9 | } 10 | -------------------------------------------------------------------------------- /27_code-in-process/27_package-os/07_Stdout_Stdin/02/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "io" 5 | "os" 6 | "strings" 7 | ) 8 | 9 | func main() { 10 | rdr := strings.NewReader("test") 11 | io.Copy(os.Stdout, rdr) 12 | } 13 | -------------------------------------------------------------------------------- /27_code-in-process/35_hash/00_notes/notes.txt: -------------------------------------------------------------------------------- 1 | md5 not secure 2 | 3 | sha-1 not secure 4 | 5 | sha-256 still fine 6 | 7 | fnv not cryptographic, but super fast! 8 | 9 | for passwords / confidential data: 10 | bcrypt 11 | scrypt 12 | -------------------------------------------------------------------------------- /27_code-in-process/53_datastore/03_users_datastore_exercise/app.yaml: -------------------------------------------------------------------------------- 1 | application: astute-curve-100822 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | login: required 10 | -------------------------------------------------------------------------------- /27_code-in-process/54_AJAX/02_users_datastore_exercise_AJAX/app.yaml: -------------------------------------------------------------------------------- 1 | application: astute-curve-100822 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | login: required 10 | -------------------------------------------------------------------------------- /27_code-in-process/66_authentication_OAUTH/03_oauth-github/05_configuration_scheduled-tasks_cron/app.yaml: -------------------------------------------------------------------------------- 1 | application: learning-1130 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | -------------------------------------------------------------------------------- /27_code-in-process/66_authentication_OAUTH/08_oauth-dropbox/app.yaml: -------------------------------------------------------------------------------- 1 | application: learning-1130 2 | version: dropbox 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | secure: always 9 | script: _go_app 10 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Constance_Smith_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Constance_Smith_tn.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Jennifer_Jerome_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Jennifer_Jerome_tn.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Jonathan_Ferrar_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Jonathan_Ferrar_tn.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Lorenzo_Garcia_01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Lorenzo_Garcia_01.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Lorenzo_Garcia_02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Lorenzo_Garcia_02.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Lorenzo_Garcia_03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Lorenzo_Garcia_03.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Lorenzo_Garcia_04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Lorenzo_Garcia_04.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Riley_Rewington_01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Riley_Rewington_01.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Riley_Rewington_02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Riley_Rewington_02.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Riley_Rewington_03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Riley_Rewington_03.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Riley_Rewington_04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Riley_Rewington_04.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Riley_Rewington_05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Riley_Rewington_05.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Riley_Rewington_06.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Riley_Rewington_06.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Riley_Rewington_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Riley_Rewington_tn.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week6/1-text-editors/1-emmet.html: -------------------------------------------------------------------------------- 1 | .header 2 | h1.logo 3 | a 4 | nav.nav 5 | ul 6 | li.nav-item 7 | a.nav-link 8 | 9 | .header>h1.logo>a^nav.nav>ul>li.nav-item>a.nav-link 10 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week6/3-html5/7-progress/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week6/7-polymer/1-registering/1-polymer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week6/7-polymer/4-local-dom/2-diploma-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week6/7-polymer/4-local-dom/2-diploma-bg.jpg -------------------------------------------------------------------------------- /03_variables/03_less-emphasis/05_infer-mixed-up-types/var.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | 7 | var message = "Hello World!" 8 | var a, b, c = 1, false, 3 9 | 10 | fmt.Println(message, a, b, c) 11 | } 12 | -------------------------------------------------------------------------------- /06_constants/03_iota/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | const ( 6 | a = iota // 0 7 | b = iota // 1 8 | c = iota // 2 9 | ) 10 | 11 | func main() { 12 | fmt.Println(a) 13 | fmt.Println(b) 14 | fmt.Println(c) 15 | } 16 | -------------------------------------------------------------------------------- /06_constants/04_iota/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | const ( 6 | a = iota // 0 7 | b // 1 8 | c // 2 9 | ) 10 | 11 | func main() { 12 | fmt.Println(a) 13 | fmt.Println(b) 14 | fmt.Println(c) 15 | } 16 | -------------------------------------------------------------------------------- /07_memory-address/01_showing-address/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | 7 | a := 43 8 | 9 | fmt.Println("a - ", a) 10 | fmt.Println("a's memory address - ", &a) 11 | fmt.Printf("%d \n", &a) 12 | } 13 | -------------------------------------------------------------------------------- /12_if_else-if_else/05_if-else/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | 7 | if false { 8 | fmt.Println("first print statement") 9 | } else { 10 | fmt.Println("second print statement") 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /21_interfaces/02_package-sort/03_sort-Strings/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "sort" 6 | ) 7 | 8 | func main() { 9 | s := []string{"Zeno", "John", "Al", "Jenny"} 10 | sort.Strings(s) 11 | fmt.Println(s) 12 | } 13 | -------------------------------------------------------------------------------- /27_code-in-process/40_testing/01/example/sum_test.go: -------------------------------------------------------------------------------- 1 | package example 2 | 3 | import "testing" 4 | 5 | func TestSum(t *testing.T) { 6 | var n int 7 | n = Sum(1, 2) 8 | if n != 3 { 9 | t.Error("Expected 3, got ", n) 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /27_code-in-process/45_serving-files/11_static-file-server/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "log" 5 | "net/http" 6 | ) 7 | 8 | func main() { 9 | log.Fatal(http.ListenAndServe(":9000", http.FileServer(http.Dir(".")))) 10 | } 11 | -------------------------------------------------------------------------------- /27_code-in-process/47_templates/01_text-templates/01/tpl.gohtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 |

Hello

9 | 10 | -------------------------------------------------------------------------------- /27_code-in-process/47_templates/01_text-templates/02/tpl.gohtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 |

{{5}}

9 | 10 | -------------------------------------------------------------------------------- /27_code-in-process/47_templates/01_text-templates/03/tpl.gohtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 |

{{.}}

9 | 10 | -------------------------------------------------------------------------------- /27_code-in-process/47_templates/01_text-templates/04/tpl.gohtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 |

{{.}}

9 | 10 | -------------------------------------------------------------------------------- /27_code-in-process/52_memcache/05_memcache-session/06_photo-blog_UNFINISHED/assets/imgs/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/52_memcache/05_memcache-session/06_photo-blog_UNFINISHED/assets/imgs/01.jpg -------------------------------------------------------------------------------- /27_code-in-process/60_movie-website/02_image-upload-GCS/types.go: -------------------------------------------------------------------------------- 1 | package movieinfo 2 | 3 | import "google.golang.org/appengine/search" 4 | 5 | type Movie struct { 6 | Title string 7 | Summary search.HTML 8 | PosterID string 9 | } 10 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week10/payment/app.yaml: -------------------------------------------------------------------------------- 1 | application: xenon-petal-100822 2 | version: payment 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | secure: always 9 | script: _go_app 10 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Barot_Bellingham_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Barot_Bellingham_tn.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hillary_Goldwynn_01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hillary_Goldwynn_01.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hillary_Goldwynn_02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hillary_Goldwynn_02.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hillary_Goldwynn_03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hillary_Goldwynn_03.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hillary_Goldwynn_04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hillary_Goldwynn_04.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hillary_Goldwynn_05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hillary_Goldwynn_05.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hillary_Goldwynn_06.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hillary_Goldwynn_06.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hillary_Goldwynn_07.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hillary_Goldwynn_07.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hillary_Goldwynn_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hillary_Goldwynn_tn.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Lorenzo_Garcia_01_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Lorenzo_Garcia_01_tn.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Lorenzo_Garcia_02_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Lorenzo_Garcia_02_tn.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Lorenzo_Garcia_03_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Lorenzo_Garcia_03_tn.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Lorenzo_Garcia_04_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Lorenzo_Garcia_04_tn.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Riley_Rewington_01_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Riley_Rewington_01_tn.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Riley_Rewington_02_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Riley_Rewington_02_tn.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Riley_Rewington_03_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Riley_Rewington_03_tn.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Riley_Rewington_04_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Riley_Rewington_04_tn.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Riley_Rewington_05_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Riley_Rewington_05_tn.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Riley_Rewington_06_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Riley_Rewington_06_tn.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week6/2-browser-devtools/zmail/js/count.js: -------------------------------------------------------------------------------- 1 | var count = document.querySelector('.email-count'); 2 | var item = document.querySelectorAll('.email-item'); 3 | 4 | count.innerHTML = '(' + item.length + ')'; -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week6/7-polymer/5-data-binding/2-diploma-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week6/7-polymer/5-data-binding/2-diploma-bg.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week8/firstAppEngine/app.yaml: -------------------------------------------------------------------------------- 1 | application: xenon-petal-100822 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | login: required 9 | script: _go_app 10 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week8/profile/app.yaml: -------------------------------------------------------------------------------- 1 | application: xenon-petal-100822 2 | version: profile 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | login: required 9 | script: _go_app 10 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week8/todolist/app.yaml: -------------------------------------------------------------------------------- 1 | application: xenon-petal-100822 2 | version: todo 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | login: required 9 | script: _go_app 10 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week9/chat-example/app.yaml: -------------------------------------------------------------------------------- 1 | application: xenon-petal-100822 2 | version: chat 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | login: required 9 | script: _go_app 10 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week9/chat-example/routes.go: -------------------------------------------------------------------------------- 1 | package chat 2 | 3 | import "net/http" 4 | 5 | func init() { 6 | http.Handle("/", http.FileServer(http.Dir("public/"))) 7 | http.Handle("/api/", newAPI("/api/")) 8 | } 9 | -------------------------------------------------------------------------------- /04_scope/01_package-scope/02_visibility/vis/printer.go: -------------------------------------------------------------------------------- 1 | package vis 2 | 3 | import "fmt" 4 | 5 | // PrintVar is exported because it starts with a capital letter 6 | func PrintVar() { 7 | fmt.Println(MyName) 8 | fmt.Println(yourName) 9 | } 10 | -------------------------------------------------------------------------------- /06_constants/06_iota/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | const ( 6 | _ = iota // 0 7 | b = iota * 10 // 1 * 10 8 | c = iota * 10 // 2 * 10 9 | ) 10 | 11 | func main() { 12 | fmt.Println(b) 13 | fmt.Println(c) 14 | } 15 | -------------------------------------------------------------------------------- /16_exercise-solutions/01_half/02/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func half(n int) (float64, bool) { 6 | return float64(n) / 2, n%2 == 0 7 | } 8 | 9 | func main() { 10 | h, even := half(5) 11 | fmt.Println(h, even) 12 | } 13 | -------------------------------------------------------------------------------- /27_code-in-process/60_movie-website/01_search/templates/index.gohtml: -------------------------------------------------------------------------------- 1 | {{define "index"}} 2 | {{template "header"}} 3 |

Movie Information

4 | Search 5 | New Movie 6 | {{template "footer"}} 7 | {{end}} 8 | -------------------------------------------------------------------------------- /27_code-in-process/97_temp/02/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | func init() { 8 | fmt.Println("Who ran first?", x) 9 | } 10 | 11 | func main() { 12 | fmt.Println("Hello world.") 13 | } 14 | 15 | var x int = 17 16 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week10/dropbox-api/app.yaml: -------------------------------------------------------------------------------- 1 | application: xenon-petal-100822 2 | version: dropbox 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | secure: always 9 | script: _go_app 10 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hillary_Goldwynn_01_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hillary_Goldwynn_01_tn.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hillary_Goldwynn_02_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hillary_Goldwynn_02_tn.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hillary_Goldwynn_03_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hillary_Goldwynn_03_tn.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hillary_Goldwynn_04_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hillary_Goldwynn_04_tn.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hillary_Goldwynn_05_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hillary_Goldwynn_05_tn.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hillary_Goldwynn_06_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hillary_Goldwynn_06_tn.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hillary_Goldwynn_07_tn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week3/loadImage/images/Hillary_Goldwynn_07_tn.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week5/web-components-training-exercises/nesting-components/accordion_component/styles.css: -------------------------------------------------------------------------------- 1 | .accordion .content { 2 | overflow-y: hidden; 3 | } 4 | .closed { 5 | max-height: 0; 6 | visibility: hidden; 7 | } -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week9/movie-search/app.yaml: -------------------------------------------------------------------------------- 1 | application: xenon-petal-100822 2 | version: search 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | login: required 9 | script: _go_app 10 | -------------------------------------------------------------------------------- /27_code-in-process/99_svcc/32_static-FileServer/assets/images/home/dev_fest-as-Smart-Object-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/99_svcc/32_static-FileServer/assets/images/home/dev_fest-as-Smart-Object-1.jpg -------------------------------------------------------------------------------- /04_scope/05_same-package/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | fmt.Println(x) 7 | } 8 | 9 | // IMPORTANT 10 | // to run this code: 11 | // go run *.go 12 | // ---- OR ---- 13 | // go build 14 | //./05_same-package 15 | -------------------------------------------------------------------------------- /12_if_else-if_else/02_not-exclamation/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | 7 | if !true { 8 | fmt.Println("This did not run") 9 | } 10 | 11 | if !false { 12 | fmt.Println("This ran") 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /14_functions/13_recursion/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func factorial(x int) int { 6 | if x == 0 { 7 | return 1 8 | } 9 | return x * factorial(x-1) 10 | } 11 | 12 | func main() { 13 | fmt.Println(factorial(4)) 14 | } 15 | -------------------------------------------------------------------------------- /14_functions/14_defer/01_no-defer/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func hello() { 6 | fmt.Print("hello ") 7 | } 8 | 9 | func world() { 10 | fmt.Println("world") 11 | } 12 | 13 | func main() { 14 | world() 15 | hello() 16 | } 17 | -------------------------------------------------------------------------------- /21_interfaces/05_conversion-vs-assertion/01_conversion/02_float-to-int/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | var x = 12 7 | var y = 12.1230123 8 | fmt.Println(int(y) + x) 9 | // conversion: float64 to int 10 | } 11 | -------------------------------------------------------------------------------- /27_code-in-process/51_appengine-introduction/03_google-maps-api/assets/img/IMG_20150714_191905.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/51_appengine-introduction/03_google-maps-api/assets/img/IMG_20150714_191905.jpg -------------------------------------------------------------------------------- /27_code-in-process/53_datastore/04_julien-schmidt-router/02-with-appengine/app.yaml: -------------------------------------------------------------------------------- 1 | application: astute-curve-100822 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app 9 | login: required 10 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week9/movie-search/templates/movie.gohtml: -------------------------------------------------------------------------------- 1 | {{define "movieItem"}} 2 | {{.Name}} 3 | {{end}} 4 | 5 | {{define "movieDetails"}} 6 |

{{.Name}}

7 |

{{.Summary}}

8 | {{end}} 9 | -------------------------------------------------------------------------------- /10_for-loop/06_for_continue/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | i := 0 7 | for { 8 | i++ 9 | if i%2 == 0 { 10 | continue 11 | } 12 | fmt.Println(i) 13 | if i >= 50 { 14 | break 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /21_interfaces/05_conversion-vs-assertion/01_conversion/01_int-to-float/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | var x = 12 7 | var y = 12.1230123 8 | fmt.Println(y + float64(x)) 9 | // conversion: int to float64 10 | } 11 | -------------------------------------------------------------------------------- /27_code-in-process/26_playing-with-type/xx07_int/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | type myType int 6 | 7 | func main() { 8 | var x myType = 32 9 | fmt.Println(x) 10 | fmt.Printf("%T\n", x) 11 | fmt.Printf("%T\n", int(x)) 12 | } 13 | -------------------------------------------------------------------------------- /27_code-in-process/47_templates/01_text-templates/09_function/tpl.gohtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ .Title }} 6 | 7 | 8 | {{mycustomfunc}} 9 | 10 | -------------------------------------------------------------------------------- /27_code-in-process/47_templates/01_text-templates/10_function/tpl.gohtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ .Title }} 6 | 7 | 8 | {{uppercase .Title}} 9 | 10 | -------------------------------------------------------------------------------- /27_code-in-process/47_templates/x03_exercises/02/hw.gohtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 |

FIRST TEMPLATE

9 | {{ . }} 10 | 11 | -------------------------------------------------------------------------------- /27_code-in-process/60_movie-website/02_image-upload-GCS/templates/index.gohtml: -------------------------------------------------------------------------------- 1 | {{define "index"}} 2 | {{template "header"}} 3 |

Movie Information

4 | Search 5 | New Movie 6 | {{template "footer"}} 7 | {{end}} 8 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week8/testExample/example.go: -------------------------------------------------------------------------------- 1 | package example 2 | 3 | // Sum finds the sum of all inputs. 4 | func Sum(xs ...int) int { 5 | sum := 0 6 | for _, v := range xs { 7 | sum += v 8 | } 9 | return sum 10 | } 11 | -------------------------------------------------------------------------------- /03_variables/03_less-emphasis/02_declare-many-at-once/var.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | var message string 7 | var a, b, c int 8 | a = 1 9 | 10 | message = "Hello World!" 11 | 12 | fmt.Println(message, a, b, c) 13 | } 14 | -------------------------------------------------------------------------------- /12_if_else-if_else/04_init-statement_error_invalid-code/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | 7 | b := true 8 | 9 | if food := "Chocolate"; b { 10 | fmt.Println(food) 11 | } 12 | 13 | fmt.Println(food) 14 | 15 | } 16 | -------------------------------------------------------------------------------- /14_functions/14_defer/02_with-defer/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func hello() { 6 | fmt.Print("hello ") 7 | } 8 | 9 | func world() { 10 | fmt.Println("world") 11 | } 12 | 13 | func main() { 14 | defer world() 15 | hello() 16 | } 17 | -------------------------------------------------------------------------------- /19_map/02_var_make/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | 7 | var myGreeting = make(map[string]string) 8 | myGreeting["Tim"] = "Good morning." 9 | myGreeting["Jenny"] = "Bonjour." 10 | 11 | fmt.Println(myGreeting) 12 | } 13 | -------------------------------------------------------------------------------- /27_code-in-process/26_playing-with-type/02_string/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | type mySentence string 6 | 7 | func main() { 8 | var message mySentence = "Hello World!" 9 | fmt.Println(message) 10 | fmt.Printf("%T\n", message) 11 | } 12 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week2/changingBackground/changingBackground.css: -------------------------------------------------------------------------------- 1 | html { 2 | background: none no-repeat center center fixed; 3 | background-size: cover; 4 | -webkit-transition: background-image 2s; 5 | transition: background-image 2s; 6 | } -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week4/angularAjax/script.js: -------------------------------------------------------------------------------- 1 | var app = angular.module('app', []); 2 | 3 | app.controller('controller', function($scope, $http) { 4 | $http.get('data.json').success(function(data) { 5 | $scope.people = data; 6 | }) 7 | }); -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week6/5-web-components/2-html-templates/1-fresno-night.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week6/5-web-components/2-html-templates/1-fresno-night.jpg -------------------------------------------------------------------------------- /14_functions/10_func-expression/03_func-expression_shows-type/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | 7 | greeting := func() { 8 | fmt.Println("Hello world!") 9 | } 10 | 11 | greeting() 12 | fmt.Printf("%T\n", greeting) 13 | } 14 | -------------------------------------------------------------------------------- /18_slice/13_int-slice-plus-plus/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | mySlice := make([]int, 1) 7 | fmt.Println(mySlice[0]) 8 | mySlice[0] = 7 9 | fmt.Println(mySlice[0]) 10 | mySlice[0]++ 11 | fmt.Println(mySlice[0]) 12 | } 13 | -------------------------------------------------------------------------------- /19_map/03_shorthand_make/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | 7 | myGreeting := make(map[string]string) 8 | myGreeting["Tim"] = "Good morning." 9 | myGreeting["Jenny"] = "Bonjour." 10 | 11 | fmt.Println(myGreeting) 12 | } 13 | -------------------------------------------------------------------------------- /21_interfaces/05_conversion-vs-assertion/01_conversion/06_strconv/01_Atoi/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "strconv" 6 | ) 7 | 8 | func main() { 9 | var x = "12" 10 | var y = 6 11 | z, _ := strconv.Atoi(x) 12 | fmt.Println(y + z) 13 | } 14 | -------------------------------------------------------------------------------- /27_code-in-process/26_playing-with-type/00_types/02_strings/05_index-access/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | greeting := "Hello" 7 | fmt.Println(greeting) 8 | fmt.Println(greeting[0]) 9 | fmt.Println(greeting[4]) 10 | } 11 | -------------------------------------------------------------------------------- /27_code-in-process/34_package-time/02_time-parse/01/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "time" 6 | ) 7 | 8 | func main() { 9 | timeAsString := "2012-01-22" 10 | fmt.Println(time.Parse("2006-01-01_this-does-not-compile", timeAsString)) 11 | } 12 | -------------------------------------------------------------------------------- /27_code-in-process/34_package-time/02_time-parse/02/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "time" 6 | ) 7 | 8 | func main() { 9 | timeAsString := "01/22/2012" 10 | fmt.Println(time.Parse("01/01_this-does-not-compile/2006", timeAsString)) 11 | } 12 | -------------------------------------------------------------------------------- /27_code-in-process/47_templates/01_text-templates/11/tpl.gohtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ .Title }} 6 | 7 | 8 | {{uppercase .Title}} 9 | {{ .Body }} 10 | 11 | -------------------------------------------------------------------------------- /27_code-in-process/47_templates/02_html-templates/01/tpl.gohtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ .Title }} 6 | 7 | 8 | {{uppercase .Title}} 9 | {{ .Body }} 10 | 11 | -------------------------------------------------------------------------------- /27_code-in-process/47_templates/02_html-templates/02/tpl.gohtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ .Title }} 6 | 7 | 8 | {{uppercase .Title}} 9 | {{ .Body }} 10 | 11 | -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/24_session/model.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | type User struct { 4 | Email string 5 | UserName string `datastore:"-"` 6 | Password string `json:"-"` 7 | } 8 | 9 | type templateData struct { 10 | User 11 | LoggedIn bool 12 | } 13 | -------------------------------------------------------------------------------- /27_code-in-process/60_movie-website/01_search/templates.go: -------------------------------------------------------------------------------- 1 | package movieinfo 2 | 3 | import "github.com/alecthomas/template" 4 | 5 | var tpl = template.Must( 6 | template.New(""). 7 | Funcs(template.FuncMap{}). 8 | ParseGlob("templates/*.gohtml"), 9 | ) 10 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week9/movie-search/template.go: -------------------------------------------------------------------------------- 1 | package search 2 | 3 | import "html/template" 4 | 5 | var tpl *template.Template 6 | 7 | func init() { 8 | tpl = template.Must(template.New("").ParseGlob("templates/*.gohtml")) 9 | } 10 | -------------------------------------------------------------------------------- /27_code-in-process/99_svcc/07_composition/tpl.gohtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Composition 6 | 7 | 8 | 9 |

{{ .Name }}

10 |

{{ .Age }}

11 | 12 | -------------------------------------------------------------------------------- /19_map/04_shorthand_composite-literal/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | 7 | myGreeting := map[string]string{} 8 | myGreeting["Tim"] = "Good morning." 9 | myGreeting["Jenny"] = "Bonjour." 10 | 11 | fmt.Println(myGreeting) 12 | } 13 | -------------------------------------------------------------------------------- /19_map/05_shorthand_composite-literal/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | 7 | myGreeting := map[string]string{ 8 | "Tim": "Good morning!", 9 | "Jenny": "Bonjour!", 10 | } 11 | 12 | fmt.Println(myGreeting["Jenny"]) 13 | } 14 | -------------------------------------------------------------------------------- /21_interfaces/05_conversion-vs-assertion/01_conversion/05_string-to-slice-of-bytes/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | fmt.Println([]byte("hello")) 7 | // conversion: string to []bytes 8 | // we'll learn about []bytes soon 9 | } 10 | -------------------------------------------------------------------------------- /27_code-in-process/51_appengine-introduction/02_photo-blog_somewhat-crappy-code-FYI/assets/imgs/CANADA 023.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/51_appengine-introduction/02_photo-blog_somewhat-crappy-code-FYI/assets/imgs/CANADA 023.jpg -------------------------------------------------------------------------------- /27_code-in-process/51_appengine-introduction/02_photo-blog_somewhat-crappy-code-FYI/assets/imgs/to_upload.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/51_appengine-introduction/02_photo-blog_somewhat-crappy-code-FYI/assets/imgs/to_upload.jpg -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/25_session-all-pages/model.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | type User struct { 4 | Email string 5 | UserName string `datastore:"-"` 6 | Password string `json:"-"` 7 | } 8 | 9 | type sessionData struct { 10 | User 11 | LoggedIn bool 12 | } 13 | -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/26_login/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /form/.* 8 | script: _go_app 9 | secure: always 10 | - url: /.* 11 | script: _go_app 12 | 13 | # order matters -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/27_logout/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /form/.* 8 | script: _go_app 9 | secure: always 10 | - url: /.* 11 | script: _go_app 12 | 13 | # order matters -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/32_tweets/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /form/.* 8 | script: _go_app 9 | secure: always 10 | - url: /.* 11 | script: _go_app 12 | 13 | # order matters -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/37_other-implementations/01_daniel/templates/tweet.gohtml: -------------------------------------------------------------------------------- 1 | {{define "tweet"}} 2 |
3 | @{{.Username}} 4 |

{{.Message}}

5 |

{{.SubmitTime}}

6 |
7 | {{end}} 8 | -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/38_follow/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /form/.* 8 | script: _go_app 9 | secure: always 10 | - url: /.* 11 | script: _go_app 12 | 13 | # order matters -------------------------------------------------------------------------------- /27_code-in-process/60_movie-website/01_search/routes.go: -------------------------------------------------------------------------------- 1 | package movieinfo 2 | 3 | import "net/http" 4 | 5 | func init() { 6 | http.HandleFunc("/", handleIndex) 7 | http.HandleFunc("/search", handleSearch) 8 | http.HandleFunc("/new-movie", handleNewMovie) 9 | } 10 | -------------------------------------------------------------------------------- /04_scope/01_package-scope/02_visibility/main/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "github.com/GoesToEleven/GolangTraining/04_scope/01_package-scope/02_visibility/vis" 6 | ) 7 | 8 | func main() { 9 | fmt.Println(vis.MyName) 10 | vis.PrintVar() 11 | } 12 | -------------------------------------------------------------------------------- /04_scope/02_block-scope/01_this-does-not-compile/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | x := 42 7 | fmt.Println(x) 8 | foo() 9 | } 10 | 11 | func foo() { 12 | // no access to x 13 | // this does not compile 14 | fmt.Println(x) 15 | } 16 | -------------------------------------------------------------------------------- /06_constants/01_constant/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | const p = "death & taxes" 6 | 7 | func main() { 8 | 9 | const q = 42 10 | 11 | fmt.Println("p - ", p) 12 | fmt.Println("q - ", q) 13 | } 14 | 15 | // a CONSTANT is a simple unchanging value 16 | -------------------------------------------------------------------------------- /18_slice/12_multi-dimensional/02_var-slice/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | func main() { 8 | var student []string 9 | var students [][]string 10 | fmt.Println(student) 11 | fmt.Println(students) 12 | fmt.Println(student == nil) 13 | } 14 | -------------------------------------------------------------------------------- /27_code-in-process/26_playing-with-type/00_types/03_strconv/01_itoa/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "strconv" 6 | ) 7 | 8 | func main() { 9 | var x int = 5 10 | str := "Hello world " + strconv.Itoa(x) // int to ascii 11 | fmt.Println(str) 12 | } 13 | -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/11_HTTPS-TLS/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /form/.* 8 | script: _go_app 9 | secure: always 10 | - url: /.* 11 | script: _go_app 12 | 13 | # order matters -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/14_code-review/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /form/.* 8 | script: _go_app 9 | secure: always 10 | - url: /.* 11 | script: _go_app 12 | 13 | # order matters -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/24_session/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /form/.* 8 | script: _go_app 9 | secure: always 10 | - url: /.* 11 | script: _go_app 12 | 13 | # order matters -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/28_code-review/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /form/.* 8 | script: _go_app 9 | secure: always 10 | - url: /.* 11 | script: _go_app 12 | 13 | # order matters -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/34_humanize/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /form/.* 8 | script: _go_app 9 | secure: always 10 | - url: /.* 11 | script: _go_app 12 | 13 | # order matters -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/36_user-tweets/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /form/.* 8 | script: _go_app 9 | secure: always 10 | - url: /.* 11 | script: _go_app 12 | 13 | # order matters -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/37_other-implementations/03_t/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /login 8 | script: _go_app 9 | login: required 10 | - url: /.* 11 | script: _go_app 12 | 13 | -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/39_unfollow/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /form/.* 8 | script: _go_app 9 | secure: always 10 | - url: /.* 11 | script: _go_app 12 | 13 | # order matters -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/42_following/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /form/.* 8 | script: _go_app 9 | secure: always 10 | - url: /.* 11 | script: _go_app 12 | 13 | # order matters -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/44_code-review/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /form/.* 8 | script: _go_app 9 | secure: always 10 | - url: /.* 11 | script: _go_app 12 | 13 | # order matters -------------------------------------------------------------------------------- /27_code-in-process/60_movie-website/02_image-upload-GCS/templates.go: -------------------------------------------------------------------------------- 1 | package movieinfo 2 | 3 | import "github.com/alecthomas/template" 4 | 5 | var tpl = template.Must( 6 | template.New(""). 7 | Funcs(template.FuncMap{}). 8 | ParseGlob("templates/*.gohtml"), 9 | ) 10 | -------------------------------------------------------------------------------- /27_code-in-process/99_svcc/10_xss/tpl.gohtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ .Title }} 6 | 7 | 8 |

{{ .Heading}}

9 | {{ .Input }} 10 | 11 | -------------------------------------------------------------------------------- /14_functions/06_return-multiple/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | fmt.Println(greet("Jane ", "Doe ")) 7 | } 8 | 9 | func greet(fname, lname string) (string, string) { 10 | return fmt.Sprint(fname, lname), fmt.Sprint(lname, fname) 11 | } 12 | -------------------------------------------------------------------------------- /27_code-in-process/26_playing-with-type/xx08_slice-ints/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | type myType []int 6 | 7 | func main() { 8 | var x myType = []int{32, 44, 57} 9 | fmt.Println(x) 10 | fmt.Printf("%T\n", x) 11 | fmt.Printf("%T\n", []int(x)) 12 | } 13 | -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/12_error-handling/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /form/.* 8 | script: _go_app 9 | secure: always 10 | - url: /.* 11 | script: _go_app 12 | 13 | # order matters -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/13_login_unfinished/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /form/.* 8 | script: _go_app 9 | secure: always 10 | - url: /.* 11 | script: _go_app 12 | 13 | # order matters -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/15_memcache-home/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /form/.* 8 | script: _go_app 9 | secure: always 10 | - url: /.* 11 | script: _go_app 12 | 13 | # order matters -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/22_set-cookie_PATH/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /form/.* 8 | script: _go_app 9 | secure: always 10 | - url: /.* 11 | script: _go_app 12 | 13 | # order matters -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/23_set-cookie-UUID/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /form/.* 8 | script: _go_app 9 | secure: always 10 | - url: /.* 11 | script: _go_app 12 | 13 | # order matters -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/26_login/model.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | type User struct { 4 | Email string 5 | UserName string `datastore:"-"` 6 | Password string `json:"-"` 7 | } 8 | 9 | type sessionData struct { 10 | User 11 | LoggedIn bool 12 | LoginFail bool 13 | } 14 | -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/31_modal-post-tweet/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /form/.* 8 | script: _go_app 9 | secure: always 10 | - url: /.* 11 | script: _go_app 12 | 13 | # order matters -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/37_other-implementations/02_tommy/app.yaml: -------------------------------------------------------------------------------- 1 | application: secret-spark-101320 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /login 8 | login: required 9 | script: _go_app 10 | - url: /.* 11 | script: _go_app 12 | -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/43_following-me/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /form/.* 8 | script: _go_app 9 | secure: always 10 | - url: /.* 11 | script: _go_app 12 | 13 | # order matters -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week9/movie-search/route.go: -------------------------------------------------------------------------------- 1 | package search 2 | 3 | import "net/http" 4 | 5 | func init() { 6 | http.HandleFunc("/", handleIndex) 7 | http.HandleFunc("/addMovie", handleAdd) 8 | http.HandleFunc("/search", handleSearch) 9 | } 10 | -------------------------------------------------------------------------------- /27_code-in-process/99_svcc/12_parsefiles/tpl.gohtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ .Title }} 6 | 7 | 8 |

from tpl: {{ .Title}}

9 |

from tpl: {{ .Body }}

10 | 11 | -------------------------------------------------------------------------------- /27_code-in-process/99_svcc/45_sessions_GORILLA_photo-blog/assets/imgs/6fc3a32bcd369a0e908dec305a510595a07b0235.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/99_svcc/45_sessions_GORILLA_photo-blog/assets/imgs/6fc3a32bcd369a0e908dec305a510595a07b0235.jpg -------------------------------------------------------------------------------- /27_code-in-process/99_svcc/45_sessions_GORILLA_photo-blog/assets/imgs/be8cc3d85b3e75846d55517f7334bef69446784b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/99_svcc/45_sessions_GORILLA_photo-blog/assets/imgs/be8cc3d85b3e75846d55517f7334bef69446784b.jpg -------------------------------------------------------------------------------- /08_pointers/04_using-pointers/02_pointer/02_see-the-addresses/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func zero(z *int) { 6 | fmt.Println(z) 7 | *z = 0 8 | } 9 | 10 | func main() { 11 | x := 5 12 | fmt.Println(&x) 13 | zero(&x) 14 | fmt.Println(x) // x is 0 15 | } 16 | -------------------------------------------------------------------------------- /16_exercise-solutions/05_params-and-args/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | foo(1, 2) 7 | foo(1, 2, 3) 8 | aSlice := []int{1, 2, 3, 4} 9 | foo(aSlice...) 10 | foo() 11 | } 12 | 13 | func foo(numbers ...int) { 14 | fmt.Println(numbers) 15 | } 16 | -------------------------------------------------------------------------------- /18_slice/12_multi-dimensional/01_shorthand-slice/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | func main() { 8 | student := []string{} 9 | students := [][]string{} 10 | fmt.Println(student) 11 | fmt.Println(students) 12 | fmt.Println(student == nil) 13 | } 14 | -------------------------------------------------------------------------------- /19_map/07_len/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | 7 | myGreeting := map[string]string{ 8 | "Tim": "Good morning!", 9 | "Jenny": "Bonjour!", 10 | } 11 | 12 | myGreeting["Harleen"] = "Howdy" 13 | 14 | fmt.Println(len(myGreeting)) 15 | } 16 | -------------------------------------------------------------------------------- /27_code-in-process/26_playing-with-type/00_types/02_strings/02_sequence-of-bytes/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | intro := "Four score and seven years ago...." 7 | fmt.Println(intro) 8 | fmt.Println([]byte(intro)) // sequence of bytes 9 | } 10 | -------------------------------------------------------------------------------- /27_code-in-process/31_package-ioutil/02_WriteFile/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "io/ioutil" 5 | ) 6 | 7 | func main() { 8 | 9 | err := ioutil.WriteFile("hello.txt", []byte("Hello world"), 0777) 10 | if err != nil { 11 | panic("something went wrong") 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /27_code-in-process/49_cookies-sessions/12_GORILLA_photo-blog/assets/imgs/3965abfccced1772f3ad984bcbc7c80d2a17c164.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/49_cookies-sessions/12_GORILLA_photo-blog/assets/imgs/3965abfccced1772f3ad984bcbc7c80d2a17c164.jpg -------------------------------------------------------------------------------- /27_code-in-process/49_cookies-sessions/12_GORILLA_photo-blog/assets/imgs/ba2081058f83d0b91877f7789b9ae54790c1f3c2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/49_cookies-sessions/12_GORILLA_photo-blog/assets/imgs/ba2081058f83d0b91877f7789b9ae54790c1f3c2.jpg -------------------------------------------------------------------------------- /27_code-in-process/49_cookies-sessions/12_GORILLA_photo-blog/assets/imgs/d4e3b9efe789874cc85596c7721987d4c8f363c8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/49_cookies-sessions/12_GORILLA_photo-blog/assets/imgs/d4e3b9efe789874cc85596c7721987d4c8f363c8.jpg -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/17_memcache-templates/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /form/.* 8 | script: _go_app 9 | secure: always 10 | - url: /.* 11 | script: _go_app 12 | 13 | # order matters -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/18_abstract-API-Model/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /form/.* 8 | script: _go_app 9 | secure: always 10 | - url: /.* 11 | script: _go_app 12 | 13 | # order matters -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/21_set-cookie_no-PATH/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /form/.* 8 | script: _go_app 9 | secure: always 10 | - url: /.* 11 | script: _go_app 12 | 13 | # order matters -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/25_session-all-pages/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /form/.* 8 | script: _go_app 9 | secure: always 10 | - url: /.* 11 | script: _go_app 12 | 13 | # order matters -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/27_logout/model.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | type User struct { 4 | Email string 5 | UserName string `datastore:"-"` 6 | Password string `json:"-"` 7 | } 8 | 9 | type sessionData struct { 10 | User 11 | LoggedIn bool 12 | LoginFail bool 13 | } 14 | -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/29_password-encryption/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /form/.* 8 | script: _go_app 9 | secure: always 10 | - url: /.* 11 | script: _go_app 12 | 13 | # order matters -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/30_turn-off-memcache/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /form/.* 8 | script: _go_app 9 | secure: always 10 | - url: /.* 11 | script: _go_app 12 | 13 | # order matters -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/33_display-all-tweets/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /form/.* 8 | script: _go_app 9 | secure: always 10 | - url: /.* 11 | script: _go_app 12 | 13 | # order matters -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/41_twitter-send-email/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /form/.* 8 | script: _go_app 9 | secure: always 10 | - url: /.* 11 | script: _go_app 12 | 13 | # order matters -------------------------------------------------------------------------------- /27_code-in-process/99_svcc/11_html-templates/tpl.gohtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ .Title }} 6 | 7 | 8 |

{{ .Heading}}

9 | {{ .Input }} 10 | 11 | -------------------------------------------------------------------------------- /27_code-in-process/99_svcc/13_ParseGlob/templates/tpl.gohtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ .Title }} 6 | 7 | 8 |

from tpl: {{ .Title}}

9 |

from tpl: {{ .Body }}

10 | 11 | -------------------------------------------------------------------------------- /19_map/06_adding-entry/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | 7 | myGreeting := map[string]string{ 8 | "Tim": "Good morning!", 9 | "Jenny": "Bonjour!", 10 | } 11 | 12 | myGreeting["Harleen"] = "Howdy" 13 | 14 | fmt.Println(myGreeting) 15 | } 16 | -------------------------------------------------------------------------------- /21_interfaces/02_package-sort/05_sort-int_type-IntSlice/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "sort" 6 | ) 7 | 8 | func main() { 9 | n := []int{7, 4, 8, 2, 9, 19, 12, 32, 3} 10 | 11 | fmt.Println(n) 12 | sort.Sort(sort.IntSlice(n)) 13 | fmt.Println(n) 14 | 15 | } 16 | -------------------------------------------------------------------------------- /27_code-in-process/26_playing-with-type/00_types/06_math-pkg/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "math" 6 | ) 7 | 8 | func main() { 9 | up := 34.705945 10 | down := 34.405945 11 | fmt.Println(math.Floor(up + 0.5)) 12 | fmt.Println(math.Floor(down + 0.5)) 13 | } 14 | -------------------------------------------------------------------------------- /27_code-in-process/37_review-exercises/04_swap-two_pointers/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func swap(x, y *int) { 6 | *x, *y = *y, *x 7 | } 8 | 9 | func main() { 10 | x := 1 11 | y := 2 12 | swap(&x, &y) 13 | fmt.Println("x", x) 14 | fmt.Println("y", y) 15 | } 16 | -------------------------------------------------------------------------------- /27_code-in-process/40_testing/01/example/sum.go: -------------------------------------------------------------------------------- 1 | package example 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | func Sum(nums ...int) int { 8 | fmt.Print(nums, " ") 9 | total := 0 10 | for _, num := range nums { 11 | total += num 12 | } 13 | fmt.Println(total) 14 | return total 15 | } 16 | -------------------------------------------------------------------------------- /27_code-in-process/40_testing/02/example/sum.go: -------------------------------------------------------------------------------- 1 | package example 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | func Sum(nums ...int) int { 8 | fmt.Print(nums, " ") 9 | total := 0 10 | for _, num := range nums { 11 | total += num 12 | } 13 | fmt.Println(total) 14 | return total 15 | } 16 | -------------------------------------------------------------------------------- /27_code-in-process/47_templates/02_html-templates/03/tpl.gohtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ .Title }} 6 | 7 | 8 |

from tpl: {{ .Title}}

9 |

from tpl: {{ .Body }}

10 | 11 | -------------------------------------------------------------------------------- /27_code-in-process/47_templates/02_html-templates/04/tpl.gohtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ .Title }} 6 | 7 | 8 |

from tpl: {{ .Title}}

9 |

from tpl: {{ .Body }}

10 | 11 | -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/16_abstract-memcache-code/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /form/.* 8 | script: _go_app 9 | secure: always 10 | - url: /.* 11 | script: _go_app 12 | 13 | # order matters -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/28_code-review/model.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | type User struct { 4 | Email string 5 | UserName string `datastore:"-"` 6 | Password string `json:"-"` 7 | } 8 | 9 | type SessionData struct { 10 | User 11 | LoggedIn bool 12 | LoginFail bool 13 | } 14 | -------------------------------------------------------------------------------- /27_code-in-process/66_authentication_OAUTH/02_manual-auth/02_gorilla_REVIEW_photo-blog/02_photo-blog/assets/imgs/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/66_authentication_OAUTH/02_manual-auth/02_gorilla_REVIEW_photo-blog/02_photo-blog/assets/imgs/01.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week4/flickrFeed/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "flickr-feed", 3 | "version": "0.0.1", 4 | "author": "Daniel", 5 | "license": "MIT", 6 | "devDependencies": { 7 | "gulp": "^3.9.0", 8 | "gulp-webserver": "^0.9.1" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week4/liveSearch/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "live-search", 3 | "version": "0.0.1", 4 | "author": "Daniel", 5 | "license": "MIT", 6 | "devDependencies": { 7 | "gulp": "^3.9.0", 8 | "gulp-webserver": "^0.9.1" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week6/5-web-components/4-html-imports/1-index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |

Parent

9 | 10 | 11 | -------------------------------------------------------------------------------- /18_slice/10_append_slice-to-slice/01_slice-of-ints/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | 7 | mySlice := []int{1, 2, 3, 4, 5} 8 | myOtherSlice := []int{6, 7, 8, 9} 9 | 10 | mySlice = append(mySlice, myOtherSlice...) 11 | 12 | fmt.Println(mySlice) 13 | } 14 | -------------------------------------------------------------------------------- /18_slice/12_multi-dimensional/03_make-slice/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | func main() { 8 | student := make([]string, 35) 9 | students := make([][]string, 35) 10 | fmt.Println(student) 11 | fmt.Println(students) 12 | fmt.Println(student == nil) 13 | } 14 | -------------------------------------------------------------------------------- /19_map/14_hash-table/01_letter-buckets/09_int-slice-plus-plus/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | buckets := make([]int, 1) 7 | fmt.Println(buckets[0]) 8 | buckets[0] = 42 9 | fmt.Println(buckets[0]) 10 | buckets[0]++ 11 | fmt.Println(buckets[0]) 12 | } 13 | -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/19_abstract-API-Model_AE-fix/App/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /form/.* 8 | script: _go_app 9 | secure: always 10 | - url: /.* 11 | script: _go_app 12 | 13 | # order matters -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/20_reverting_to_only_package-main/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /form/.* 8 | script: _go_app 9 | secure: always 10 | - url: /.* 11 | script: _go_app 12 | 13 | # order matters -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/29_password-encryption/model.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | type User struct { 4 | Email string 5 | UserName string `datastore:"-"` 6 | Password string `json:"-"` 7 | } 8 | 9 | type SessionData struct { 10 | User 11 | LoggedIn bool 12 | LoginFail bool 13 | } 14 | -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/30_turn-off-memcache/model.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | type User struct { 4 | Email string 5 | UserName string `datastore:"-"` 6 | Password string `json:"-"` 7 | } 8 | 9 | type SessionData struct { 10 | User 11 | LoggedIn bool 12 | LoginFail bool 13 | } 14 | -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/31_modal-post-tweet/model.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | type User struct { 4 | Email string 5 | UserName string `datastore:"-"` 6 | Password string `json:"-"` 7 | } 8 | 9 | type SessionData struct { 10 | User 11 | LoggedIn bool 12 | LoginFail bool 13 | } 14 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week2/changingBackground/wallpapers/1036809-1440x900-[DesktopNexus.com].jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week2/changingBackground/wallpapers/1036809-1440x900-[DesktopNexus.com].jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week2/changingBackground/wallpapers/1062969-1440x900-[DesktopNexus.com].jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week2/changingBackground/wallpapers/1062969-1440x900-[DesktopNexus.com].jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week2/changingBackground/wallpapers/729965-1440x900-[DesktopNexus.com].jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week2/changingBackground/wallpapers/729965-1440x900-[DesktopNexus.com].jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week2/changingBackground/wallpapers/813495-1440x900-[DesktopNexus.com].jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week2/changingBackground/wallpapers/813495-1440x900-[DesktopNexus.com].jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week2/changingBackground/wallpapers/821425-1440x900-[DesktopNexus.com].jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/98-good-student-code/daniel/Week2/changingBackground/wallpapers/821425-1440x900-[DesktopNexus.com].jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week6/7-polymer/1-registering/1-index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /27_code-in-process/99_svcc/44_file-paths/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | "path/filepath" 7 | ) 8 | 9 | func main() { 10 | wd, _ := os.Getwd() 11 | filename := "01.jpg" 12 | path := filepath.Join(wd, "assets", "imgs", filename) 13 | fmt.Println(path) 14 | } 15 | -------------------------------------------------------------------------------- /14_functions/02_param-arg/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | greet("Jane") 7 | greet("John") 8 | } 9 | 10 | func greet(name string) { 11 | fmt.Println(name) 12 | } 13 | 14 | // greet is declared with a parameter 15 | // when calling greet, pass in an argument 16 | -------------------------------------------------------------------------------- /21_interfaces/05_conversion-vs-assertion/01_conversion/04_rune-to-slice-of-bytes-to-string/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | fmt.Println(string([]byte{'h', 'e', 'l', 'l', 'o'})) 7 | // conversion: []bytes to string 8 | // we'll learn about []bytes soon 9 | } 10 | -------------------------------------------------------------------------------- /27_code-in-process/47_templates/02_html-templates/05/templates/tpl.gohtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ .Title }} 6 | 7 | 8 |

from tpl: {{ .Title}}

9 |

from tpl: {{ .Body }}

10 | 11 | -------------------------------------------------------------------------------- /27_code-in-process/51_appengine-introduction/04_SERVICE_users/app.yaml: -------------------------------------------------------------------------------- 1 | application: astute-curve-100822 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /admin/.* 8 | script: _go_app 9 | login: admin 10 | - url: /.* 11 | script: _go_app 12 | login: required 13 | -------------------------------------------------------------------------------- /27_code-in-process/62_self-destructing-message/02_crypto/01_nonce/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "crypto/rand" 5 | "fmt" 6 | "io" 7 | ) 8 | 9 | func main() { 10 | var nonce [24]byte 11 | fmt.Println(nonce) 12 | io.ReadFull(rand.Reader, nonce[:]) 13 | fmt.Println(nonce) 14 | } 15 | -------------------------------------------------------------------------------- /27_code-in-process/66_authentication_OAUTH/01_app-engine-auth_REVIEW/app.yaml: -------------------------------------------------------------------------------- 1 | application: learning-1130 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /admin/.* 8 | script: _go_app 9 | login: admin 10 | - url: /.* 11 | script: _go_app 12 | login: required 13 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week4/mustacheTemplate/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mustache-template", 3 | "version": "0.0.1", 4 | "author": "Daniel", 5 | "license": "MIT", 6 | "devDependencies": { 7 | "gulp": "^3.9.0", 8 | "gulp-webserver": "^0.9.1" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /27_code-in-process/99_svcc/05_pipeline-range/tpl.gohtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 | 13 | 14 | -------------------------------------------------------------------------------- /03_variables/03_less-emphasis/06_init-shorthand/var.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | 7 | // you can only do this inside a func 8 | message := "Hello World!" 9 | a, b, c := 1, false, 3 10 | d := 4 11 | e := true 12 | 13 | fmt.Println(message, a, b, c, d, e) 14 | } 15 | -------------------------------------------------------------------------------- /13_exercise-solutions/08_just-fyi/01_benchMark/bm_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "testing" 6 | ) 7 | 8 | func BenchmarkHello(b *testing.B) { 9 | for i := 0; i < b.N; i++ { 10 | fmt.Sprintf("hello") 11 | } 12 | } 13 | 14 | // run this at command: 15 | // go test -bench='.*' 16 | -------------------------------------------------------------------------------- /14_functions/11_closure/01/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | x := 42 7 | fmt.Println(x) 8 | { 9 | fmt.Println(x) 10 | y := "The credit belongs with the one who is in the ring." 11 | fmt.Println(y) 12 | } 13 | // fmt.Println(y) // outside scope of y 14 | } 15 | -------------------------------------------------------------------------------- /27_code-in-process/26_playing-with-type/xx05_slice-strings/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | type mySentences []string 6 | 7 | func main() { 8 | var messages mySentences = []string{"Hello World!", "More coffee"} 9 | fmt.Println(messages) 10 | fmt.Printf("%T\n", messages) 11 | } 12 | -------------------------------------------------------------------------------- /27_code-in-process/47_templates/01_text-templates/05/tpl.gohtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 | 13 | 14 | -------------------------------------------------------------------------------- /14_functions/10_func-expression/04_another-way_func-expression/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func makeGreeter() func() string { 6 | return func() string { 7 | return "Hello world!" 8 | } 9 | } 10 | 11 | func main() { 12 | greet := makeGreeter() 13 | fmt.Println(greet()) 14 | } 15 | -------------------------------------------------------------------------------- /20_struct/06_struct-pointer/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | type person struct { 6 | name string 7 | age int 8 | } 9 | 10 | func main() { 11 | p1 := &person{"James", 20} 12 | fmt.Println(p1) 13 | fmt.Printf("%T\n", p1) 14 | fmt.Println(p1.name) 15 | fmt.Println(p1.age) 16 | } 17 | -------------------------------------------------------------------------------- /21_interfaces/01_interface/01_no-interface/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | type square struct { 6 | side float64 7 | } 8 | 9 | func (z square) area() float64 { 10 | return z.side * z.side 11 | } 12 | 13 | func main() { 14 | s := square{10} 15 | fmt.Println("Area: ", s.area()) 16 | } 17 | -------------------------------------------------------------------------------- /21_interfaces/02_package-sort/06_sort-int_type-IntSlice_reverse/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "sort" 6 | ) 7 | 8 | func main() { 9 | n := []int{7, 4, 8, 2, 9, 19, 12, 32, 3} 10 | 11 | fmt.Println(n) 12 | sort.Sort(sort.Reverse(sort.IntSlice(n))) 13 | fmt.Println(n) 14 | 15 | } 16 | -------------------------------------------------------------------------------- /27_code-in-process/27_package-os/00_args/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | ) 7 | 8 | func main() { 9 | entry := os.Args[1] 10 | fmt.Println(entry) 11 | } 12 | 13 | /* 14 | step 1: 15 | go install 16 | 17 | step 2 - from terminal: 18 | programName arguments 19 | 20 | */ 21 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week7/Hello/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | fmt.Println("Hello World!") 7 | fmt.Print("What is your name? ") 8 | var myName string 9 | fmt.Scanf("%s", &myName) 10 | fmt.Println("It is nice to meet you", myName) 11 | } 12 | -------------------------------------------------------------------------------- /04_scope/02_block-scope/02_closure/01/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | x := 42 7 | fmt.Println(x) 8 | { 9 | fmt.Println(x) 10 | y := "The credit belongs with the one who is in the ring." 11 | fmt.Println(y) 12 | } 13 | // fmt.Println(y) // outside scope of y 14 | } 15 | -------------------------------------------------------------------------------- /04_scope/04_variable-shadowing/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func max(x int) int { 6 | return 42 + x 7 | } 8 | 9 | func main() { 10 | max := max(7) 11 | fmt.Println(max) // max is now the result, not the function 12 | } 13 | 14 | // don't do this; bad coding practice to shadow variables 15 | -------------------------------------------------------------------------------- /12_if_else-if_else/06_if-elseif-else/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | 7 | if false { 8 | fmt.Println("first print statement") 9 | } else if true { 10 | fmt.Println("second print statement") 11 | } else { 12 | fmt.Println("third print statement") 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /17_array/05/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | var x [256]string 7 | 8 | fmt.Println(len(x)) 9 | fmt.Println(x[0]) 10 | for i := 0; i < 256; i++ { 11 | x[i] = string(i) 12 | } 13 | for _, v := range x { 14 | fmt.Printf("%v - %T - %v\n", v, v, []byte(v)) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /22_go-routines/09_channels/01_range/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | func main() { 8 | c := make(chan int) 9 | 10 | go func() { 11 | for i := 0; i < 10; i++ { 12 | c <- i 13 | } 14 | close(c) 15 | }() 16 | 17 | for n := range c { 18 | fmt.Println(n) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /27_code-in-process/26_playing-with-type/03_string-conversion/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | type mySentence string 6 | 7 | func main() { 8 | var message mySentence = "Hello World!" 9 | fmt.Println(message) 10 | fmt.Printf("%T\n", message) 11 | fmt.Printf("%T\n", string(message)) 12 | } 13 | -------------------------------------------------------------------------------- /27_code-in-process/37_review-exercises/01_gravatar/page.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | user picture 9 | 10 | 11 | -------------------------------------------------------------------------------- /27_code-in-process/66_authentication_OAUTH/02_manual-auth/03_memcache_REVIEW_twitter/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitmock-1012 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /form/.* 8 | script: _go_app 9 | secure: always 10 | - url: /.* 11 | script: _go_app 12 | 13 | # order matters -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week6/5-web-components/4-html-imports/1-component.html: -------------------------------------------------------------------------------- 1 |

Component

2 | 3 | 8 | 9 | 13 | -------------------------------------------------------------------------------- /27_code-in-process/99_svcc/12_parsefiles/tpl2.gohtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ .Title }} 6 | 7 | 8 |

This is the title from tpl2: {{ .Title}}

9 |

This is the body from tpl2: {{ .Body }}

10 | 11 | -------------------------------------------------------------------------------- /22_go-routines/01_no-go/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | foo() 7 | bar() 8 | } 9 | 10 | func foo() { 11 | for i := 0; i < 45; i++ { 12 | fmt.Println("Foo:", i) 13 | } 14 | } 15 | 16 | func bar() { 17 | for i := 0; i < 45; i++ { 18 | fmt.Println("Bar:", i) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /22_go-routines/10_deadlock-challenges/01_deadlock-challenge/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | func main() { 8 | c := make(chan int) 9 | c <- 1 10 | fmt.Println(<-c) 11 | } 12 | 13 | // This results in a deadlock. 14 | // Can you determine why? 15 | // And what would you do to fix it? 16 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week4/angularAjax/data.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Bob", 4 | "age": 27, 5 | "job": "Businessman" 6 | }, 7 | { 8 | "name": "Polly", 9 | "age": 30, 10 | "job": "Artists" 11 | }, 12 | { 13 | "name": "Jeff", 14 | "age": 15, 15 | "job": "Student" 16 | } 17 | ] -------------------------------------------------------------------------------- /27_code-in-process/99_svcc/10_xss/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Nothing Escaped 6 | 7 | 8 |

Nothing is escaped with text/template

9 | 10 | 11 | -------------------------------------------------------------------------------- /21_interfaces/05_conversion-vs-assertion/01_conversion/06_strconv/02_Itoa/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "strconv" 6 | ) 7 | 8 | func main() { 9 | x := 12 10 | y := "I have this many: " + strconv.Itoa(x) 11 | fmt.Println(y) 12 | // fmt.Println("I have this many: ", strconv.Itoa(x), x) 13 | } 14 | -------------------------------------------------------------------------------- /21_interfaces/05_conversion-vs-assertion/02_assertion/02_interface-string/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | var name interface{} = "Sydney" 7 | str, ok := name.(string) 8 | if ok { 9 | fmt.Printf("%T\n", str) 10 | } else { 11 | fmt.Printf("value is not a string\n") 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /21_interfaces/05_conversion-vs-assertion/02_assertion/03_interface-string_not-ok/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | var name interface{} = 7 7 | str, ok := name.(string) 8 | if ok { 9 | fmt.Printf("%T\n", str) 10 | } else { 11 | fmt.Printf("value is not a string\n") 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /27_code-in-process/43_HTTP-server/01/i01/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "net/http" 5 | ) 6 | 7 | type MyHandler int 8 | 9 | func (h MyHandler) ServeHTTP(res http.ResponseWriter, req *http.Request) { 10 | 11 | } 12 | 13 | func main() { 14 | var h MyHandler 15 | 16 | http.ListenAndServe(":9000", h) 17 | } 18 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week10/filebrowser/app.yaml: -------------------------------------------------------------------------------- 1 | application: xenon-petal-100822 2 | version: browser 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /public 8 | static_dir: public 9 | - url: / 10 | secure: always 11 | script: _go_app 12 | - url: /.* 13 | script: _go_app 14 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week4/mustacheTemplate/data.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Bob", 4 | "age": 27, 5 | "job": "Businessman" 6 | }, 7 | { 8 | "name": "Polly", 9 | "age": 30, 10 | "job": "Artists" 11 | }, 12 | { 13 | "name": "Jeff", 14 | "age": 15, 15 | "job": "Student" 16 | } 17 | ] -------------------------------------------------------------------------------- /27_code-in-process/99_svcc/13_ParseGlob/templates/tpl2.gohtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ .Title }} 6 | 7 | 8 |

This is the title from tpl2: {{ .Title}}

9 |

This is the body from tpl2: {{ .Body }}

10 | 11 | -------------------------------------------------------------------------------- /01_getting-started/02_numeral-systems/03_hexadecimal/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | // fmt.Printf("%d - %b - %x \n", 42, 42, 42) 7 | // fmt.Printf("%d - %b - %#x \n", 42, 42, 42) 8 | // fmt.Printf("%d - %b - %#X \n", 42, 42, 42) 9 | fmt.Printf("%d \t %b \t %#X \n", 42, 42, 42) 10 | } 11 | -------------------------------------------------------------------------------- /03_variables/02_var_zero-value/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | 7 | var a int 8 | var b string 9 | var c float64 10 | var d bool 11 | 12 | fmt.Printf("%v \n", a) 13 | fmt.Printf("%v \n", b) 14 | fmt.Printf("%v \n", c) 15 | fmt.Printf("%v \n", d) 16 | 17 | fmt.Println() 18 | } 19 | -------------------------------------------------------------------------------- /05_blank-identifier/02_http-get_example/02_no-error-checking/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "io/ioutil" 6 | "net/http" 7 | ) 8 | 9 | func main() { 10 | res, _ := http.Get("http://www.geekwiseacademy.com/") 11 | page, _ := ioutil.ReadAll(res.Body) 12 | res.Body.Close() 13 | fmt.Printf("%s", page) 14 | } -------------------------------------------------------------------------------- /14_functions/15_passing-by-value/06_REFERENCE-TYPE/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | m := make([]string, 1, 25) 7 | fmt.Println(m) // [ ] 8 | changeMe(m) 9 | fmt.Println(m) // [Todd] 10 | } 11 | 12 | func changeMe(z []string) { 13 | z[0] = "Todd" 14 | fmt.Println(z) // [Todd] 15 | } 16 | -------------------------------------------------------------------------------- /18_slice/10_append_slice-to-slice/02_slice-of-strings/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | 7 | mySlice := []string{"Monday", "Tuesday"} 8 | myOtherSlice := []string{"Wednesday", "Thursday", "Friday"} 9 | 10 | mySlice = append(mySlice, myOtherSlice...) 11 | 12 | fmt.Println(mySlice) 13 | } 14 | -------------------------------------------------------------------------------- /19_map/13_loop-range/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | 7 | myGreeting := map[int]string{ 8 | 0: "Good morning!", 9 | 1: "Bonjour!", 10 | 2: "Buenos dias!", 11 | 3: "Bongiorno!", 12 | } 13 | 14 | for key, val := range myGreeting { 15 | fmt.Println(key, " - ", val) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /19_map/14_hash-table/01_letter-buckets/05_hash-function/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | n := hashBucket("Go", 12) 7 | fmt.Println(n) 8 | } 9 | 10 | func hashBucket(word string, buckets int) int { 11 | letter := int(word[0]) 12 | bucket := letter % buckets 13 | return bucket 14 | } 15 | -------------------------------------------------------------------------------- /21_interfaces/05_conversion-vs-assertion/02_assertion/01_non-interface-error_invalid-code/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | name := "Sydney" 7 | str, ok := name.(string) 8 | if ok { 9 | fmt.Printf("%q\n", str) 10 | } else { 11 | fmt.Printf("value is not a string\n") 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /23_error-handling/02_err-not-nil/05_panic/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "os" 5 | ) 6 | 7 | func main() { 8 | _, err := os.Open("no-file.txt") 9 | if err != nil { 10 | // fmt.Println("err happened", err) 11 | // log.Println("err happened", err) 12 | // log.Fatalln(err) 13 | panic(err) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /27_code-in-process/26_playing-with-type/00_types/02_strings/06_slicing/02/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | greeting := "Hello" 7 | fmt.Println(greeting) 8 | fmt.Println(greeting[:4]) 9 | fmt.Println(greeting[0:4]) 10 | fmt.Println(greeting[1:4]) 11 | fmt.Println(greeting[1:]) 12 | } 13 | -------------------------------------------------------------------------------- /27_code-in-process/26_playing-with-type/04_string_assertion_invalid-code/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | type mySentence string 6 | 7 | func main() { 8 | var message mySentence = "Hello World!" 9 | fmt.Println(message) 10 | fmt.Printf("%T\n", message) 11 | fmt.Printf("%T\n", message.(string)) 12 | } 13 | -------------------------------------------------------------------------------- /27_code-in-process/47_templates/02_html-templates/03/tpl2.gohtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ .Title }} 6 | 7 | 8 |

This is the title from tpl2: {{ .Title}}

9 |

This is the body from tpl2: {{ .Body }}

10 | 11 | -------------------------------------------------------------------------------- /27_code-in-process/47_templates/02_html-templates/04/tpl2.gohtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ .Title }} 6 | 7 | 8 |

This is the title from tpl2: {{ .Title}}

9 |

This is the body from tpl2: {{ .Body }}

10 | 11 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week7/monuments/test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

Station 11A

6 |

814.80ft

7 | 8 | 9 | -------------------------------------------------------------------------------- /22_go-routines/02_go_concurrency/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | go foo() 7 | go bar() 8 | } 9 | 10 | func foo() { 11 | for i := 0; i < 45; i++ { 12 | fmt.Println("Foo:", i) 13 | } 14 | } 15 | 16 | func bar() { 17 | for i := 0; i < 45; i++ { 18 | fmt.Println("Bar:", i) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week6/2-browser-devtools/zmail/js/menu.js: -------------------------------------------------------------------------------- 1 | var menuButton = document.querySelector('.nav-menu-button'), 2 | nav = document.querySelector('#nav'); 3 | 4 | menuButton.addEventListener('click', function (e) { 5 | debugger; 6 | nav.classList.toggle('active'); 7 | e.preventDefault(); 8 | }); -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week8/profile/viewProfile.gohtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{.FirstName}} {{.LastName}} 6 | 7 | 8 |

Name: {{.FirstName}} {{.LastName}}

9 |

Email: {{.Email}} 10 | 11 | 12 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week9/movie-search/templates/header.gohtml: -------------------------------------------------------------------------------- 1 | {{define "header"}} 2 | Main page 3 | Add a movie 4 |

5 | 6 | 7 |
8 | {{end}} 9 | -------------------------------------------------------------------------------- /07_memory-address/02_using-address/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | const metersToYards float64 = 1.09361 6 | 7 | func main() { 8 | var meters float64 9 | fmt.Print("Enter meters swam: ") 10 | fmt.Scan(&meters) 11 | yards := meters * metersToYards 12 | fmt.Println(meters, " meters is ", yards, " yards.") 13 | } 14 | -------------------------------------------------------------------------------- /17_array/03/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | var x [256]int 7 | 8 | fmt.Println(len(x)) 9 | fmt.Println(x[42]) 10 | for i := 0; i < 256; i++ { 11 | x[i] = i 12 | } 13 | for i, v := range x { 14 | fmt.Printf("%v - %T - %b\n", v, v, v) 15 | if i > 50 { 16 | break 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /18_slice/12_multi-dimensional/04_comparing_shorthand_var_make/02_var-slice/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | func main() { 8 | var student []string 9 | var students [][]string 10 | student[0] = "Todd" 11 | // student = append(student, "Todd") 12 | fmt.Println(student) 13 | fmt.Println(students) 14 | } 15 | -------------------------------------------------------------------------------- /27_code-in-process/47_templates/02_html-templates/05/templates/tpl2.gohtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ .Title }} 6 | 7 | 8 |

This is the title from tpl2: {{ .Title}}

9 |

This is the body from tpl2: {{ .Body }}

10 | 11 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week2/magic8ball/magic-ball.js: -------------------------------------------------------------------------------- 1 | function changeImage() { 2 | 'use strict'; 3 | var image = document.querySelector('#magic8'); 4 | image.style.backgroundImage = 'url("8ball/' + Math.ceil(Math.random() * 20) + '.png")'; 5 | } 6 | 7 | document.querySelector('button').addEventListener('click', changeImage); -------------------------------------------------------------------------------- /23_error-handling/01_golint/02_after/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | x := 1 7 | str := evalInt(x) 8 | fmt.Println(str) 9 | } 10 | 11 | func evalInt(n int) string { 12 | 13 | if n > 10 { 14 | return fmt.Sprint("x is greater than 10") 15 | } 16 | 17 | return fmt.Sprint("x is less than 10") 18 | } 19 | -------------------------------------------------------------------------------- /27_code-in-process/27_package-os/07_Stdout_Stdin/01/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "io" 5 | "log" 6 | "os" 7 | ) 8 | 9 | func main() { 10 | 11 | f, err := os.Open(os.Args[1:]) 12 | if err != nil { 13 | log.Fatalln("my program broke: ", err.Error()) 14 | } 15 | defer f.Close() 16 | 17 | io.Copy(os.Stdout, f) 18 | } 19 | -------------------------------------------------------------------------------- /27_code-in-process/35_hash/01_FNV/01/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "hash/fnv" 6 | "io" 7 | "os" 8 | ) 9 | 10 | func main() { 11 | f, err := os.Open(os.Args[1]) 12 | if err != nil { 13 | panic(err) 14 | } 15 | defer f.Close() 16 | 17 | h := fnv.New64() 18 | io.Copy(h, f) 19 | fmt.Println(h.Sum64()) 20 | } 21 | -------------------------------------------------------------------------------- /14_functions/10_func-expression/05_another-way_func-expression_shows-type/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func makeGreeter() func() string { 6 | return func() string { 7 | return "Hello world!" 8 | } 9 | } 10 | 11 | func main() { 12 | greet := makeGreeter() 13 | fmt.Println(greet()) 14 | fmt.Printf("%T\n", greet) 15 | } 16 | -------------------------------------------------------------------------------- /14_functions/15_passing-by-value/01_int/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | age := 44 7 | changeMe(age) 8 | fmt.Println(age) // 44 9 | } 10 | 11 | func changeMe(z int) { 12 | fmt.Println(z) 13 | z = 24 14 | } 15 | 16 | // when changeMe is called on line 8 17 | // the value 44 is being passed as an argument 18 | -------------------------------------------------------------------------------- /17_array/04/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | var x [256]byte 7 | 8 | fmt.Println(len(x)) 9 | fmt.Println(x[42]) 10 | for i := 0; i < 256; i++ { 11 | x[i] = byte(i) 12 | } 13 | for i, v := range x { 14 | fmt.Printf("%v - %T - %b\n", v, v, v) 15 | if i > 50 { 16 | break 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /18_slice/12_multi-dimensional/04_comparing_shorthand_var_make/01_shorthand-slice/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | func main() { 8 | student := []string{} 9 | students := [][]string{} 10 | student[0] = "Todd" 11 | // student = append(student, "Todd") 12 | fmt.Println(student) 13 | fmt.Println(students) 14 | } 15 | -------------------------------------------------------------------------------- /19_map/11_deleting-entry_no-error/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | 7 | myGreeting := map[int]string{ 8 | 0: "Good morning!", 9 | 1: "Bonjour!", 10 | 2: "Buenos dias!", 11 | 3: "Bongiorno!", 12 | } 13 | 14 | fmt.Println(myGreeting) 15 | delete(myGreeting, 7) 16 | fmt.Println(myGreeting) 17 | } 18 | -------------------------------------------------------------------------------- /23_error-handling/01_golint/01_before/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | x := 1 7 | str := evalInt(x) 8 | fmt.Println(str) 9 | } 10 | 11 | func evalInt(n int) string { 12 | if n > 10 { 13 | return fmt.Sprint("x is greater than 10") 14 | } else { 15 | return fmt.Sprint("x is less than 10") 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week8/colors/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/ttacon/chalk" 7 | ) 8 | 9 | func main() { 10 | strange := chalk.Red.NewStyle() 11 | strange.WithBackground(chalk.Blue).WithTextStyle(chalk.Underline) 12 | fmt.Println(strange.Style("Hello Color World!")) 13 | } 14 | -------------------------------------------------------------------------------- /27_code-in-process/99_svcc/06_pipeline-range-else/tpl.gohtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 | 15 | 16 | -------------------------------------------------------------------------------- /27_code-in-process/99_svcc/11_html-templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Nothing Escaped 6 | 7 | 8 |

Danger is escaped with html/template

9 | <script>alert("Yow!");</script> 10 | 11 | -------------------------------------------------------------------------------- /19_map/08_updating-entry/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | 7 | myGreeting := map[string]string{ 8 | "Tim": "Good morning!", 9 | "Jenny": "Bonjour!", 10 | } 11 | 12 | myGreeting["Harleen"] = "Howdy" 13 | fmt.Println(myGreeting) 14 | myGreeting["Harleen"] = "Gidday" 15 | fmt.Println(myGreeting) 16 | } 17 | -------------------------------------------------------------------------------- /21_interfaces/02_package-sort/00_notes.txt: -------------------------------------------------------------------------------- 1 | Use https://godoc.org/sort to sort the following: 2 | 3 | (1) 4 | type people []string 5 | studyGroup := people{"Zeno", "John", "Al", "Jenny"} 6 | 7 | (2) 8 | s := []string{"Zeno", "John", "Al", "Jenny"} 9 | 10 | (3) 11 | n := []int{7, 4, 8, 2, 9, 19, 12, 32, 3} 12 | 13 | Also sort the above in reverse order -------------------------------------------------------------------------------- /27_code-in-process/35_hash/02_MD5/01/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "crypto/md5" 5 | "fmt" 6 | "io" 7 | "os" 8 | ) 9 | 10 | func main() { 11 | f, err := os.Open(os.Args[1]) 12 | if err != nil { 13 | panic(err) 14 | } 15 | defer f.Close() 16 | 17 | h := md5.New() 18 | io.Copy(h, f) 19 | fmt.Printf("%x\n", h.Sum(nil)) 20 | } 21 | -------------------------------------------------------------------------------- /27_code-in-process/47_templates/01_text-templates/06/tpl.gohtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 | 15 | 16 | -------------------------------------------------------------------------------- /27_code-in-process/47_templates/01_text-templates/07/tpl.gohtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 | 15 | 16 | -------------------------------------------------------------------------------- /27_code-in-process/52_memcache/05_memcache-session/01i/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | ) 7 | 8 | func init() { 9 | http.HandleFunc("/", handleIndex) 10 | } 11 | 12 | func handleIndex(res http.ResponseWriter, req *http.Request) { 13 | cookie, _ := req.Cookie("sessionid") 14 | fmt.Fprintln(res, cookie) 15 | } 16 | -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/26_login/notes.txt: -------------------------------------------------------------------------------- 1 | Sessions - Three Options: 2 | 3 | GOOGLE 4 | Use Google logins and their session 5 | 6 | GORILLA 7 | Use Gorilla sessions 8 | store session data in cookie or memcache 9 | 10 | HMAC / NO-HMAC 11 | do a regular cookie 12 | store in that cookie a session ID 13 | store session data in cookie or memcache 14 | -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/37_other-implementations/03_t/templates/html/home.html: -------------------------------------------------------------------------------- 1 | {{template "header" . }} 2 | 3 |
4 | {{ range .Tweets }} 5 |
6 | @{{ .Username}} 7 |

{{ .Message }}

8 |
9 | {{ end }} 10 |
11 | {{template "footer" . }} -------------------------------------------------------------------------------- /14_functions/15_passing-by-value/03_string/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | 7 | name := "Todd" 8 | fmt.Println(name) // Todd 9 | 10 | changeMe(name) 11 | 12 | fmt.Println(name) // Todd 13 | } 14 | 15 | func changeMe(z string) { 16 | fmt.Println(z) // Todd 17 | z = "Rocky" 18 | fmt.Println(z) // Rocky 19 | } 20 | -------------------------------------------------------------------------------- /18_slice/12_multi-dimensional/04_comparing_shorthand_var_make/03_make-slice/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | func main() { 8 | student := make([]string, 35) 9 | students := make([][]string, 35) 10 | student[0] = "Todd" 11 | // student = append(student, "Todd") 12 | fmt.Println(student) 13 | fmt.Println(students) 14 | } 15 | -------------------------------------------------------------------------------- /27_code-in-process/26_playing-with-type/xx06_slice-strings_conversion/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | type mySentences []string 6 | 7 | func main() { 8 | var messages mySentences = []string{"Hello World!", "More coffee"} 9 | fmt.Println(messages) 10 | fmt.Printf("%T\n", messages) 11 | fmt.Printf("%T\n", []string(messages)) 12 | } 13 | -------------------------------------------------------------------------------- /27_code-in-process/35_hash/01_FNV/02/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "hash/fnv" 6 | "io" 7 | "os" 8 | ) 9 | 10 | func main() { 11 | f, err := os.Open(os.Args[1]) 12 | if err != nil { 13 | panic(err) 14 | } 15 | defer f.Close() 16 | 17 | h := fnv.New64() 18 | io.Copy(h, f) 19 | fmt.Println("The sum is:", h.Sum64()) 20 | } 21 | -------------------------------------------------------------------------------- /27_code-in-process/63_GCS-filebrowser/README.txt: -------------------------------------------------------------------------------- 1 | Go to 2 | console.developers.google.com/apis/credentials 3 | 4 | Click on 5 | Add Credentials / Service Account 6 | 7 | Create a 8 | JSON Key 9 | 10 | Then 11 | Put that JSON key into the root of your app 12 | 13 | And 14 | Change the code to access **YOUR** JSON key 15 | 16 | And also 17 | Change the app.YAML -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week2/changingBackground/changingBackground.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Background 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /09_remainder/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | x := 13 % 3 7 | fmt.Println(x) 8 | if x == 1 { 9 | fmt.Println("Odd") 10 | } else { 11 | fmt.Println("Even") 12 | } 13 | 14 | for i := 1; i < 70; i++ { 15 | if i%2 == 1 { 16 | fmt.Println("Odd") 17 | } else { 18 | fmt.Println("Even") 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /13_exercise-solutions/04_user-enters-numbers/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | var numOne int 7 | var numTwo int 8 | fmt.Print("Please enter a large number: ") 9 | fmt.Scan(&numOne) 10 | fmt.Print("Please enter a smaller number: ") 11 | fmt.Scan(&numTwo) 12 | fmt.Println(numOne, "%", numTwo, " = ", numOne%numTwo) 13 | } 14 | -------------------------------------------------------------------------------- /14_functions/08_variadic-args/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | data := []float64{43, 56, 87, 12, 45, 57} 7 | n := average(data...) 8 | fmt.Println(n) 9 | } 10 | 11 | func average(sf ...float64) float64 { 12 | total := 0.0 13 | for _, v := range sf { 14 | total += v 15 | } 16 | return total / float64(len(sf)) 17 | } 18 | -------------------------------------------------------------------------------- /14_functions/09_slice-param-arg/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | data := []float64{43, 56, 87, 12, 45, 57} 7 | n := average(data) 8 | fmt.Println(n) 9 | } 10 | 11 | func average(sf []float64) float64 { 12 | total := 0.0 13 | for _, v := range sf { 14 | total += v 15 | } 16 | return total / float64(len(sf)) 17 | } 18 | -------------------------------------------------------------------------------- /20_struct/08_encode_decode/01_encode/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "encoding/json" 5 | "os" 6 | ) 7 | 8 | type person struct { 9 | First string 10 | Last string 11 | Age int 12 | notExported int 13 | } 14 | 15 | func main() { 16 | p1 := person{"James", "Bond", 20, 007} 17 | json.NewEncoder(os.Stdout).Encode(p1) 18 | } 19 | -------------------------------------------------------------------------------- /27_code-in-process/46_errata/03_URL/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | ) 7 | 8 | func main() { 9 | http.HandleFunc("/", func(res http.ResponseWriter, req *http.Request) { 10 | res.Header().Set("Content-Type", "text/plain") 11 | fmt.Fprint(res, req.URL.Path) 12 | }) 13 | 14 | http.ListenAndServe(":9000", nil) 15 | } 16 | -------------------------------------------------------------------------------- /27_code-in-process/51_appengine-introduction/01_hello-world/hello.go: -------------------------------------------------------------------------------- 1 | package hello 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | ) 7 | 8 | func init() { 9 | http.HandleFunc("/", handler) 10 | } 11 | 12 | func handler(w http.ResponseWriter, r *http.Request) { 13 | fmt.Fprint(w, "Hello, worlddddddddxxxxxx!") 14 | w.Write([]byte("Hello, world!")) 15 | } 16 | -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/37_other-implementations/01_daniel/app.yaml: -------------------------------------------------------------------------------- 1 | application: twitter-1012 2 | version: main 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /public 8 | static_dir: public 9 | - url: /login 10 | login: required 11 | script: _go_app 12 | - url: /.* 13 | script: _go_app 14 | 15 | inbound_services: 16 | - mail 17 | -------------------------------------------------------------------------------- /27_code-in-process/56_twitter/37_other-implementations/03_t/templates/html/profile.html: -------------------------------------------------------------------------------- 1 | {{template "header" . }} 2 | 3 |
4 | {{ range .Tweets }} 5 |
6 | @{{ .Username }} 7 |

{{ .Message }}

8 |
9 | {{ end }} 10 |
11 | 12 | {{template "footer" . }} -------------------------------------------------------------------------------- /27_code-in-process/66_authentication_OAUTH/02_manual-auth/02_gorilla_REVIEW_photo-blog/02_photo-blog/assets/imgs/982a5e1884f21dc2a0e0d27e844e97607445b44e.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/66_authentication_OAUTH/02_manual-auth/02_gorilla_REVIEW_photo-blog/02_photo-blog/assets/imgs/982a5e1884f21dc2a0e0d27e844e97607445b44e.jpg -------------------------------------------------------------------------------- /27_code-in-process/66_authentication_OAUTH/02_manual-auth/02_gorilla_REVIEW_photo-blog/02_photo-blog/assets/imgs/b8869c3daeb40f44ed3e5d39e5f8665dd90e9f50.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/GolangTraining/HEAD/27_code-in-process/66_authentication_OAUTH/02_manual-auth/02_gorilla_REVIEW_photo-blog/02_photo-blog/assets/imgs/b8869c3daeb40f44ed3e5d39e5f8665dd90e9f50.jpg -------------------------------------------------------------------------------- /27_code-in-process/98-good-student-code/daniel/Week4/angularAjax/gulpfile.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'), 2 | webserver = require('gulp-webserver'); 3 | 4 | gulp.task('webserver', function() { 5 | gulp.src('.') 6 | .pipe(webserver({ 7 | port: 8080, 8 | livereload: true, 9 | open: true 10 | })); 11 | }); 12 | 13 | gulp.task('default', ['webserver']); -------------------------------------------------------------------------------- /02_package/stringutil/reverseTwo.go: -------------------------------------------------------------------------------- 1 | package stringutil 2 | 3 | func reverseTwo(s string) string { 4 | r := []rune(s) 5 | for i, j := 0, len(r)-1; i < len(r)/2; i, j = i+1, j-1 { 6 | r[i], r[j] = r[j], r[i] 7 | } 8 | return string(r) 9 | } 10 | 11 | // this demonstrates how an unexported function 12 | // can be used by an exported function in the same package 13 | -------------------------------------------------------------------------------- /14_functions/12_callbacks/01_print-nums/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func visit(numbers []int, callback func(int)) { 6 | for _, n := range numbers { 7 | callback(n) 8 | } 9 | } 10 | 11 | func main() { 12 | visit([]int{1, 2, 3, 4}, func(n int) { 13 | fmt.Println(n) 14 | }) 15 | } 16 | 17 | // callback: passing a func as an argument 18 | -------------------------------------------------------------------------------- /19_map/09_deleting-entry/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | 7 | myGreeting := map[string]string{ 8 | "zero": "Good morning!", 9 | "one": "Bonjour!", 10 | "two": "Buenos dias!", 11 | "three": "Bongiorno!", 12 | } 13 | 14 | fmt.Println(myGreeting) 15 | delete(myGreeting, "two") 16 | fmt.Println(myGreeting) 17 | } 18 | --------------------------------------------------------------------------------