├── .gitignore ├── 001-learning-git ├── canine.txt ├── labrador.txt ├── parakeet.txt ├── poodle.txt └── text.txt ├── 002-hands-on-exercises ├── 01-about │ ├── 000-TEMPLATE-about-me.txt │ ├── AndyAllin01.txt │ ├── ChristianoGGuerra.txt │ ├── FanNoof.txt │ ├── JayneJacobs.txt │ ├── LanceMercado.txt │ ├── YvesJudeMatta.txt │ ├── ali-zohrevand.txt │ ├── alibaihaqi.txt │ ├── amjad-ah.txt │ ├── aorincon1.txt │ ├── arashjoya.txt │ ├── billyice.txt │ ├── brennschlus.txt │ ├── brian-d-albrecht.txt │ ├── bugul-noz.txt │ ├── cschult.txt │ ├── dani-santos-code.txt │ ├── db325.txt │ ├── dearrudam.txt │ ├── dishar.jayantha.txt │ ├── ei09010.txt │ ├── ergeos.txt │ ├── git-aks.txt │ ├── goestoeleven.txt │ ├── hauk3wu1ff.txt │ ├── imattf.txt │ ├── janosnanai.txt │ ├── jaronaearle.txt │ ├── joshroepke.txt │ ├── jpeeling13.txt │ ├── kind84.txt │ ├── kwifrench.txt │ ├── liberate111.txt │ ├── manfredkogler.txt │ ├── mengdage.txt │ ├── mikejk8s.txt │ ├── nazevedo3.txt │ ├── oralordos.txt │ ├── osariel.txt │ ├── paulofiles.txt │ ├── pd222dj.txt │ ├── pystocks.txt │ ├── ramirezra.txt │ ├── s-hammon.txt │ ├── sagar424.txt │ ├── sebagalan.txt │ ├── senny-matrix.txt │ ├── shawnwollenberg.txt │ ├── stevenmaharaj.txt │ ├── takakuwa-s.txt │ └── tamdc2704.txt ├── 02-humble │ ├── FanNoof-humble.txt │ ├── JayneJacobs-humble.txt │ ├── LanceMercado-humble.txt │ ├── YvesJudeMatta-humble.txt │ ├── ali-zohrevand-humble.txt │ ├── alibaihaqi-humble.txt │ ├── aorincon1-humble.txt │ ├── arashjoya-humble.txt │ ├── billyice-humble.txt │ ├── brennschlus-humble.txt │ ├── brian-d-albrecht-humble.txt │ ├── bugul-noz-humble.txt │ ├── christianogguerra-humble.txt │ ├── dani-santos-code-humble.txt │ ├── dearrudam-humble.txt │ ├── dishar.jayantha-humble.txt │ ├── ei09010-humble.txt │ ├── ergeos-humble.txt │ ├── git-aks-humble.txt │ ├── goestoeleven-humble.txt │ ├── goestoeleven-humble2.txt │ ├── hauk3wu1ff-humble.txt │ ├── imattf-humble.txt │ ├── janosnanai-humble.txt │ ├── jaronaearle-humble.txt │ ├── joshroepke-humble.txt │ ├── jpeeling13-humble.txt │ ├── kind84-humble.txt │ ├── kwifrench-humble.txt │ ├── liberate111-humble.txt │ ├── manfredkogler-humble.txt │ ├── nazevedo3-humble.txt │ ├── oralordos-humble.txt │ ├── osariel-humble.txt │ ├── paulofiles-humble.txt │ ├── ramirezra-humble.txt │ ├── sagar424-humble.txt │ ├── sebagalan-humble.txt │ ├── senny-matrix-humble.txt │ ├── shawnwollenberg-humble.txt │ ├── stevenmaharaj-humble.txt │ ├── tamdc2704-humble.txt │ └── zaouldyeck-hunble.txt └── 03-purpose │ ├── .DS_Store │ ├── FanNoof-purpose.txt │ ├── JayneJacobs-purpose.txt │ ├── YvesJudeMatta-purpose.txt │ ├── aorincon1-purpose.txt │ ├── arashjoya-purpose.txt │ ├── brian-d-albrecht-purpose.txt │ ├── bugul-noz-purpose.txt │ ├── christianogguerra-purpose.txt │ ├── dani-santos-code.txt │ ├── dearrudam-purpose.txt │ ├── dishar.jayantha.txt │ ├── ei09010-purpose.txt │ ├── ergeos-purpose.txt │ ├── git-aks-purpose.txt │ ├── goestoeleven-purpose.txt │ ├── hauk3wu1ff-purpose.txt │ ├── imattf-purpose.txt │ ├── janosnanai-purpose.txt │ ├── jaronaearle-purpose.txt │ ├── joshroepke-purpose.txt │ ├── jpeeling13-purpose.txt │ ├── kind84-purpose.txt │ ├── kwifrench-purpose.txt │ ├── liberate111-purpose.txt │ ├── manfredkogler-purpose.txt │ ├── oralordos-purpose.txt │ ├── osariel-purpose.txt │ ├── sagar424-purpose.txt │ ├── sebagalan-purpose.txt │ ├── senny-matrix-purpose.txt │ ├── tamdc2704-purpose.txt │ ├── temp-todd-mcleod-purpose.txt │ └── zaouldyeck-purpose.txt ├── 003-go-modules ├── 00-russ-cox-article │ └── russ-cox-our-software-dependency-problem.pdf ├── 01-create-module │ ├── hello.go │ └── hello_test.go ├── 02-adding-dependency │ ├── hello.go │ └── hello_test.go ├── 03-add-major-dependency │ ├── hello.go │ └── hello_test.go └── 04-upgrading-major-dependency │ ├── hello.go │ └── hello_test.go ├── 004-scrape ├── 01-direct │ └── scrape.go ├── 02-api │ └── scrape.go ├── 03-analysis │ └── scrape.go └── 04-homework │ ├── 02-todd-solution │ └── main.go │ └── 03-todd-solution │ └── main.go ├── 005-grpc ├── 01-proto │ └── echo │ │ ├── echo.pb.go │ │ └── echo.proto ├── 02-server │ ├── echo │ │ ├── echo.pb.go │ │ └── echo.proto │ └── main.go ├── 03-client │ ├── echo │ │ ├── echo.pb.go │ │ └── echo.proto │ └── main.go ├── 04-chat │ ├── chat │ │ ├── chat.pb.go │ │ └── chat.proto │ ├── client │ │ └── main.go │ └── server │ │ └── main.go └── tools.go ├── FanNoof-purpose.txt ├── go.mod └── go.sum /.gitignore: -------------------------------------------------------------------------------- 1 | *.sublime-workspace 2 | *.sublime-project 3 | 4 | *.exe 5 | -------------------------------------------------------------------------------- /001-learning-git/canine.txt: -------------------------------------------------------------------------------- 1 | I love dogs 2 | 3 | here's a change 4 | -------------------------------------------------------------------------------- /001-learning-git/labrador.txt: -------------------------------------------------------------------------------- 1 | like to fetch balls 2 | 3 | plays with sticks 4 | 5 | eats furniture 6 | -------------------------------------------------------------------------------- /001-learning-git/parakeet.txt: -------------------------------------------------------------------------------- 1 | they chirp 2 | -------------------------------------------------------------------------------- /001-learning-git/poodle.txt: -------------------------------------------------------------------------------- 1 | They are smart. 2 | 3 | more 4 | 5 | even more 6 | -------------------------------------------------------------------------------- /001-learning-git/text.txt: -------------------------------------------------------------------------------- 1 | some text 2 | 3 | add some change from TODD 4 | 5 | Some more text -- Daniel 6 | 7 | hello 8 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/000-TEMPLATE-about-me.txt: -------------------------------------------------------------------------------- 1 | years started coding: 2 | coding strengths (comma seperated list): 3 | anything you want to share about yourself: 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/AndyAllin01.txt: -------------------------------------------------------------------------------- 1 | years started coding: 1979 2 | coding strengths (comma seperated list): legacy monolith 3 | anything you want to share about yourself: old 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/ChristianoGGuerra.txt: -------------------------------------------------------------------------------- 1 | years started coding:2000 as a studant and 2006 2 | coding strengths (comma seperated list):python, java, c#, javascript 3 | anything you want to share about yourself:Today I work as a quality assurance engineer 4 | 5 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/FanNoof.txt: -------------------------------------------------------------------------------- 1 | years started coding: James 2 | coding strengths (comma seperated list): Bond 3 | anything you want to share about yourself: Shaken not stirred 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/JayneJacobs.txt: -------------------------------------------------------------------------------- 1 | years started coding: 2 2 | coding strengths (comma seperated list): 3 | go,some python but I prefer go,html,css,java-script,some java but I prefer go :) 4 | 5 | anything you want to share about yourself: 6 | I am a Systems Engineer learning coding to add to my tool set. 7 | I love music and play flute, guitar, keyboard and sax, and sing. 8 | I have a band. Please see my webesite http://jaynejacobs.com 9 | 10 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/LanceMercado.txt: -------------------------------------------------------------------------------- 1 | years started coding:2020 2 | coding strengths (comma seperated list):I can read 3 | anything you want to share about yourself:Mechanical engineer 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/YvesJudeMatta.txt: -------------------------------------------------------------------------------- 1 | years started coding: 2012 2 | coding strengths (comma seperated list): HTML,CSS,JavaScript,React,Node,Go,Docker 3 | anything you want to share about yourself: Trying to become a full-stack dev from having 3-4 years experience in frontend dev. Self motivated to become successful in all areas in my life. 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/ali-zohrevand.txt: -------------------------------------------------------------------------------- 1 | years started coding: 2012 2 | coding strengths (comma seperated list): Golang, Angular , Android, HTML, IOT. 3 | anything you want to share about yourself: https://www.linkedin.com/in/ali-zohrevand, https://twitter.com/a_zohrevand/ 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/alibaihaqi.txt: -------------------------------------------------------------------------------- 1 | years started coding: 2018 2 | coding strengths (comma seperated list): vue, react, js, ts, golang (just started) 3 | anything you want to share about yourself: 4 | - I'm work as a Software Development Engineer. 5 | - Always super excited when learning new thing -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/amjad-ah.txt: -------------------------------------------------------------------------------- 1 | years started coding: 2016 2 | coding strengths (comma seperated list): php, laravel, javascript, golang 3 | anything you want to share about yourself: I'm Egyptian developer, and I love programming and LOVE GOLANG, https://twitter.com/amjad_ah_ 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/aorincon1.txt: -------------------------------------------------------------------------------- 1 | years started coding: 2019 2 | coding strengths (comma seperated list): Moderate 3 | anything you want to share about yourself: I want to grow my skills. 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/arashjoya.txt: -------------------------------------------------------------------------------- 1 | years started coding: 2007 2 | coding strengths (comma seperated list): C, C++, C#, Go 3 | anything you want to share about yourself: Coding for fun 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/billyice.txt: -------------------------------------------------------------------------------- 1 | years started coding: 15 2 | coding strengths (comma seperated list): java, c, python, cpp 3 | anything you want to share about yourself: started as a professional developer for 15 years then sold my company and became a teacher and I teach advanced High School Mathematics and Computer Science. 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/brennschlus.txt: -------------------------------------------------------------------------------- 1 | years started coding: 2019 2 | coding strengths (comma seperated list): Go 3 | anything you want to share about yourself: Just an ordinary guy at the beginning his own code adventure 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/brian-d-albrecht.txt: -------------------------------------------------------------------------------- 1 | years started coding: 1997 2 | coding strengths (comma seperated list): lots of spare time, stubbornness 3 | anything you want to share about yourself: I've worked in the tech industry for 20 years and have always wanted to do more creative things within my job but only coded simple things on rare occasions. Todd's courses have helped me learn go and gain confidence in my coding abilities so that I can start fulfilling that desire. -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/bugul-noz.txt: -------------------------------------------------------------------------------- 1 | years started coding: 2016 2 | coding strengths (comma seperated list):python,c# 3 | anything you want to share about yourself:Two favorite books -- The Slight Edge, Jeff Olson & Chop Wood Carry Water, Joshua Medcalf 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/cschult.txt: -------------------------------------------------------------------------------- 1 | years started coding: 1989 2 | coding strengths (comma seperated list): Go, Python, Shell, JavaScript, Perl 3 | anything you want to share about yourself: i'm coding just for fun 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/dani-santos-code.txt: -------------------------------------------------------------------------------- 1 | years started coding: 2016 2 | coding strengths (comma seperated list): Javascript, Python, Go 3 | anything you want to share about yourself: In Love with Go! 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/db325.txt: -------------------------------------------------------------------------------- 1 | years started coding:2011 2 | coding strengths (comma seperated list):Go,Js,Html,Css 3 | anything you want to share about yourself: I love all things GO!!! 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/dearrudam.txt: -------------------------------------------------------------------------------- 1 | year started coding: 2003 2 | coding strengths (comma separated list): Lean, Good time, Humanities, Java, Golang, Typescript, Eclipse, Intellij IDE, Netbeans, VS Code 3 | anything you want to share about yourself: Software Engineer that loves to be helpful, Karateka (I love martial arts, in special Karate), Kindness Advocate, dad of 2 awesome boys, a lucking husband of an incredible wife! 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/dishar.jayantha.txt: -------------------------------------------------------------------------------- 1 | years started coding: 2018 2 | coding strengths (comma seperated list): javascript, typescript, go 3 | anything you want to share about yourself: Love your courses Thanks. 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/ei09010.txt: -------------------------------------------------------------------------------- 1 | years started coding: 2010 2 | coding strengths (comma seperated list): c#, java spring 3 | anything you want to share about yourself: trying to add golang to the above list 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/ergeos.txt: -------------------------------------------------------------------------------- 1 | year started coding: 2015, more intensively since 2018 2 | coding strengths (comma separated list): python, pandas, go, open location code data structures, tensorflow, D3.js; (strengths compared to how terrible I am at most front-end tasks) 3 | anything you want to share about yourself: I enjoy thinking about how geospatial data can improve the quality of life of humans, the efficiency of resource production, consumption, and waste; and influence urban/environmental design. Next step is to build it out. twitter.com/rodr_io 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/git-aks.txt: -------------------------------------------------------------------------------- 1 | years started coding: since 1999 2 | coding strengths (comma seperated list): java, html, javascript, jsp, go and can understand c/c++, python code. 3 | anything you want to share about yourself: I am a software engineer who loves to code things that make life easy and takes mankind to a better place. 4 | I like music, singing, biking, eating :D and honest people. 5 | I like to learn from others experiences and respect and appreciate the wonders that have been created in this world. 6 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/goestoeleven.txt: -------------------------------------------------------------------------------- 1 | year started coding: 1983 / 2001 2 | coding strengths (comma separated list): Teaching, Good time, Humanities, Golang, HTML, CSS, VS Code 3 | anything you want to share about yourself: https://www.youtube.com/channel/UCJ8YIwWQCO7hMiqpOw2ZLFw, https://www.amazon.com/T.-Scott-McLeod/e/B006P1VPAW 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/hauk3wu1ff.txt: -------------------------------------------------------------------------------- 1 | years started coding: 1980 2 | coding strengths (comma seperated list): Java, SQL, AWS Lambda 3 | anything you want to share about yourself: Learning Go for fun. 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/imattf.txt: -------------------------------------------------------------------------------- 1 | years started coding: 33 2 | coding strengths (comma seperated list): COBOL, JCL, Python, UML, Documentation, Architecture 3 | anything you want to share about yourself: Want to learn the craft of Go := 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/janosnanai.txt: -------------------------------------------------------------------------------- 1 | years started coding: long ago 2 | coding strengths (comma seperated list): typescript, react, css, html 3 | anything you want to share about yourself: https://janosnanai.dev; fullstack software engineer, ex electrical and industrial engineer -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/jaronaearle.txt: -------------------------------------------------------------------------------- 1 | years started coding: 2017 2 | coding strengths (comma seperated list): Typical webstack, js, html, css, java, python, but I like Go the most (: 3 | anything you want to share about yourself: 4 | 5 | I like rock and ice climbing, backcountry skiing, house plants, math, and programming. 6 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/joshroepke.txt: -------------------------------------------------------------------------------- 1 | years started coding: 2019 2 | coding strengths (comma seperated list): Golang 3 | anything you want to share about yourself: I like to build things -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/jpeeling13.txt: -------------------------------------------------------------------------------- 1 | years started coding: 2013-2016 then took a hiatus until 2020. Now I'm starting to get back into it. 2 | coding strengths (comma seperated list): html, css, javascript, React.js, Go, PostgreSQL 3 | anything you want to share about yourself: I absolutely love to cook, and one day hope to be a chef of my own restaurant. Until then I'm happily learning to code. I'm originally from the Baltimore, MD area but will be moving into a van full time with my wife within the next 3-6 months. Hello West Coast! 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/kind84.txt: -------------------------------------------------------------------------------- 1 | year started coding: 2014 2 | coding strengths (comma separated list): Golang, C#, Vue.js 3 | anything you want to share about yourself: twitter.com/paolo_g84 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/kwifrench.txt: -------------------------------------------------------------------------------- 1 | years started coding: 38 2 | coding strengths (comma seperated list): C, Python, GO, VB, Java 3 | anything you want to share about yourself: Can never stop learning! 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/liberate111.txt: -------------------------------------------------------------------------------- 1 | years started coding: 2014 2 | coding strengths (comma seperated list): Go, C, C#, Javascript 3 | anything you want to share about yourself: I am beginning to begin Go Developer career, your online course helps me a lot to get this job. 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/manfredkogler.txt: -------------------------------------------------------------------------------- 1 | years started coding: 1990 2 | coding strengths (comma seperated list): C++, C 3 | anything you want to share about yourself: I love Go, since it reduces programming complexity a lot! 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/mengdage.txt: -------------------------------------------------------------------------------- 1 | years started coding: 2009 2 | coding strengths (comma seperated list): javascript 3 | anything you want to share about yourself: hello world! 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/mikejk8s.txt: -------------------------------------------------------------------------------- 1 | years started coding: 1998 2 | coding strengths (comma seperated list): mostly python 3 | anything you want to share about yourself: Work in IAAS platform architecture, wanting to contribute more to a few virtualization and networking projects that we use that are all golang! Excited to get better. I'm a wizard with yaml nowadays... 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/nazevedo3.txt: -------------------------------------------------------------------------------- 1 | year started coding: 2017 2 | coding strengths (comma separated list): Learning Go from Todd. 3 | anything you want to share about yourself: I currently work as a Network Engineer and with the help of Todd's courses on Go, I've been able to build tools to automate redundant daily tasks. He's inspired me to transition into Sofware Engieering. I'm a big fan of your courses and HOW you teach them. Thanks Todd! -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/oralordos.txt: -------------------------------------------------------------------------------- 1 | year started coding: 2005 2 | coding strengths (comma separated list): Structured Programming, Golang 3 | anything you want to share about yourself: I enjoy learning new programming things. 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/osariel.txt: -------------------------------------------------------------------------------- 1 | years started coding: 10 2 | coding strengths (comma seperated list): C, powershell, golang 3 | anything you want to share about yourself: Nothing much. Just a regular guy. Love technology. Trying to eat healthy these days. Major interest in anti aging medicine. 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/paulofiles.txt: -------------------------------------------------------------------------------- 1 | years started coding: 2011 2 | coding strengths (comma seperated list): Go, C, Python, PHP, JS 3 | anything you want to share about yourself: https://youtu.be/SqGRnlXplx0 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/pd222dj.txt: -------------------------------------------------------------------------------- 1 | years started coding: 2015 2 | coding strengths (comma seperated list): Structured, Java, Go 3 | anything you want to share about yourself: I'm Vegan! :D 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/pystocks.txt: -------------------------------------------------------------------------------- 1 | years started coding: 1 2 | coding strengths (comma seperated list): persistent 3 | anything you want to share about yourself: Happy to learn Golang! 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/ramirezra.txt: -------------------------------------------------------------------------------- 1 | years started coding: 2008/2014 2 | coding strengths (comma seperated list): golang, elm, excel/vba 3 | anything you want to share about yourself: first learned how to program by automating tasks in microsoft office products like excel, access, etc. then moved on to python, javascript, golang, elm 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/s-hammon.txt: -------------------------------------------------------------------------------- 1 | years started coding: 6 2 | coding strengths (comma seperated list): data-structures,databases,sql,python,go 3 | anything you want to share about yourself: I work in healthcare. 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/sagar424.txt: -------------------------------------------------------------------------------- 1 | years started coding: 2013 2 | coding strengths (comma seperated list): Java, Spring boot, Javascript, Angular, Golang, Python, Flutter 3 | anything you want to share about yourself: I want to be a full stack developer and solve realistic problems through coding 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/sebagalan.txt: -------------------------------------------------------------------------------- 1 | years started coding: 2002 2 | coding strengths (comma seperated list): sql, python, javascript, perl, haskell, C 3 | anything you want to share about yourself: I hate Java 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/senny-matrix.txt: -------------------------------------------------------------------------------- 1 | years started coding: 2019 2 | coding strengths (comma seperated list):Python, JavaScript, Rust and HTML/CSS 3 | anything you want to share about yourself: Trying to Master Go Web Development 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/shawnwollenberg.txt: -------------------------------------------------------------------------------- 1 | years started coding: 1999 2 | coding strengths (comma seperated list): Go,JavaScript,Vue,SQLServer,MySQL,PHP,Excel,VBA,ASP,Flutter/Dart,Systems Design,Moving data,love to learn 3 | anything you want to share about yourself: Father/Husband/Coder/Griller/Eater/Runner 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/stevenmaharaj.txt: -------------------------------------------------------------------------------- 1 | years started coding:10 2 | coding strengths (comma seperated list):trading bots, finance 3 | anything you want to share about yourself:saving the world 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/takakuwa-s.txt: -------------------------------------------------------------------------------- 1 | years started coding: 2017 2 | coding strengths (comma seperated list): java, javascript, typescript, html, css, python, c++, swift, php 3 | anything you want to share about yourself: I'm currently working as a web developer mainly in the server side. Nice to meet you! 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/01-about/tamdc2704.txt: -------------------------------------------------------------------------------- 1 | years started coding: 2013 2 | coding strengths (comma seperated list): javascript, elm 3 | anything you want to share about yourself: Vietnamese guy want to learing something new 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/FanNoof-humble.txt: -------------------------------------------------------------------------------- 1 | I appreciate you, your'e a skilled teacher, very human and inspirational. 2 | Daniel seems to have an impressive grasp on how machines think, knowledge gaps always seem instantly corrected in your courses together. 3 | You are both humble enough to explain concepts you find easy in an understandable way 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/JayneJacobs-humble.txt: -------------------------------------------------------------------------------- 1 | Very good question and this did make me think a bit though I am making up my 2 | mind as I type. 3 | 4 | What does it mean to me to be humble? It means being slow to speak and listening 5 | carefully to others. It also means remembering that I am not the center of the universe, 6 | only the center of my own universe. I try to remember there are as many perspectives as 7 | there are people and each are valid frome their own vantage point. 8 | 9 | Today I am trying to put other's first as you mentioned. That does seem like humility to me, 10 | though I am still thinking it over. 11 | -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/LanceMercado-humble.txt: -------------------------------------------------------------------------------- 1 | what is being humble 2 | why is being humble 3 | who is being humble 4 | where is being humble 5 | -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/YvesJudeMatta-humble.txt: -------------------------------------------------------------------------------- 1 | Being humble is always apperciating what you have and who is in your life even when 2 | gaining any advantages like making tons of money or getting promoted to CEO. -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/ali-zohrevand-humble.txt: -------------------------------------------------------------------------------- 1 | We have a saying in Farsi that the more fruit a tree has, the lower its head. 2 | The more I learn, the less I know and there are many things I don't know. -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/alibaihaqi-humble.txt: -------------------------------------------------------------------------------- 1 | Being humble means share what you know to others. Knowledge is meant to be share not to be kept. -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/aorincon1-humble.txt: -------------------------------------------------------------------------------- 1 | Being humble to me means that never judge someone on where they come from or 2 | what they had to do to be where they are now. 3 | -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/arashjoya-humble.txt: -------------------------------------------------------------------------------- 1 | Being humble is skilful. True wisdom lies in being humble. -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/billyice-humble.txt: -------------------------------------------------------------------------------- 1 | Being humble is a way of living and it would be a better world if everyone was humble. To me humble is respecting everyone for their talents and never besting someone and being a braggart about it. Humble is always living fairly whether you win or lose. 2 | -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/brennschlus-humble.txt: -------------------------------------------------------------------------------- 1 | Being humble has to do with recognizing your shortcomings. 2 | Nobody is perfect. Don't pretend to be good where you aren't, don't blame/ridicule others for their shortcomings. 3 | -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/brian-d-albrecht-humble.txt: -------------------------------------------------------------------------------- 1 | To me, being humble means letting my work and my actions speak for themselves. It is knowing the difference between taking pride 2 | and being prideful. It is okay to be proud of an accomplishment, but there is a fine line between sharing what has been achieved and bragging, 3 | and it varies from listener to listener. It also means owning your mistakes, and being willing to learn from them. A humble person will use 4 | their mistake as an experience to learn and become better, whereas a prideful person will never admit to being wrong and therefore won't grow. -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/bugul-noz-humble.txt: -------------------------------------------------------------------------------- 1 | What I know is not enough... -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/christianogguerra-humble.txt: -------------------------------------------------------------------------------- 1 | Good way to live and let others live without problems. 2 | -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/dani-santos-code-humble.txt: -------------------------------------------------------------------------------- 1 | Being humble is to be open to whatever is new 2 | 3 | Being humble it to know and be aware that you don't know 4 | 5 | Being humble is to accept yours and everyone else's vulnerabilities 6 | 7 | Being humble is giving away your time 8 | 9 | Being humble is not only being able to give but also to get 10 | -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/dearrudam-humble.txt: -------------------------------------------------------------------------------- 1 | Being humble means treating everyone with equality and honesty without ego and bias, knowing that you'll never know everything and you'll learn much more once you give the chance to everyone to share and learn with you together. -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/dishar.jayantha-humble.txt: -------------------------------------------------------------------------------- 1 | being nice. -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/ei09010-humble.txt: -------------------------------------------------------------------------------- 1 | being humble means thanking every day for all the luck I had in my life 2 | -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/ergeos-humble.txt: -------------------------------------------------------------------------------- 1 | Humility grounds us. It acknowledges that we all participate in the human experience. Our desire is to soar, be recognized, and accomplish great things. Humility reminds us that these great things can be accomplished with or without us. In our day-to-day life we may even share more with animals than what we consider enlightened human values. This does not mean that we should revert to primal behavior. Instead, we should embrace the humanity not only within ourselves, but with everyone on this planet: past, present, and future. In doing so, we acknowledge that there are things that make each individual unique, but no individual more inherently valuable than another. We keep this in mind as we work towards bettering ourselves, not to be better than others, but to better humankind. 2 | -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/git-aks-humble.txt: -------------------------------------------------------------------------------- 1 | Being "humble" means that we need to respect, acknowledge and care for all that is around us. We as humans have an added responsibility of ensuring that we leave this world better than we found it, and our humbleness can help the cause. -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/goestoeleven-humble.txt: -------------------------------------------------------------------------------- 1 | Being willing to be humbled is an important quality. 2 | 3 | We all have egoic pride. This pride wants to be right; doesn't want to look bad; doesn't want to be wrong. 4 | 5 | Being humble means ignoring this egoic pride. Being humble means being willing to learn. Being humble means being willing and able to say "I don't know" and "I am sorry. I didn't do that correctly. Please teach me. Please forgive me. Please help me learn." 6 | 7 | To be humble is to put your "self" second to improving, becoming better, and working more effectively with others - even living more for others instead of your "self." 8 | 9 | It is important to be humble, and to allow your "self" to be humbled. 10 | 11 | That's what being humble means to me. 12 | -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/goestoeleven-humble2.txt: -------------------------------------------------------------------------------- 1 | integrity 2 | 3 | never take that which wasn't freely given 4 | 5 | 6 | -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/hauk3wu1ff-humble.txt: -------------------------------------------------------------------------------- 1 | Being humble means being willing to learn. Being humble means being willing and able to say "I don't know" and "I am sorry. I didn't do that correctly. Please teach me. Please forgive me. Please help me learn." 2 | -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/imattf-humble.txt: -------------------------------------------------------------------------------- 1 | Being humble is willingly learning from life lessons with grace and gratitude. -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/janosnanai-humble.txt: -------------------------------------------------------------------------------- 1 | If you really think 2 | “other people just need to..!”, 3 | First look close to home. -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/jaronaearle-humble.txt: -------------------------------------------------------------------------------- 1 | Being humble is having the ability to look at yourself honestly, 2 | to be able to recognize your own strengths and weaknesses without ego and bias. -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/joshroepke-humble.txt: -------------------------------------------------------------------------------- 1 | modest -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/jpeeling13-humble.txt: -------------------------------------------------------------------------------- 1 | What does being humble mean to me? I think it means never putting yourself in a place where you feel someone else is beneath you. 2 | Humility is being patient, being a good listener, slow to speak, and willing to put others before yourself. You can still have self-confidence 3 | in yourself and what you can do, but being humble means allowing actions to speak louder than words. Being humble means admitting your mistakes, admitting that 4 | other people can do it better than you, or admitting that you don't know how to do it at all. Humble people are good learners. They have wisdom. They can see 5 | the world as other people see it, from other peoples' shoes, not just their own. 6 | -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/kind84-humble.txt: -------------------------------------------------------------------------------- 1 | Don't put yourself on top of the others. 2 | You always have something to lear from who stays around you. 3 | -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/kwifrench-humble.txt: -------------------------------------------------------------------------------- 1 | Being humble means that you should never assume your beliefs or answers are correct from other 2 | perspectives or situations. It always pays off to have an open mind and to listen as much as you 3 | speak! 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/liberate111-humble.txt: -------------------------------------------------------------------------------- 1 | Being humble is the act with words like "Thank you", "Sorry", "Never mind" in every time. -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/manfredkogler-humble.txt: -------------------------------------------------------------------------------- 1 | Beeing humble means always being aware of possibly being wrong and that eventually there is more than one single truth. -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/nazevedo3-humble.txt: -------------------------------------------------------------------------------- 1 | Being humble means to always put other people first, willingness to listen/take advice and never needing to boast about one's accomplishments. -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/oralordos-humble.txt: -------------------------------------------------------------------------------- 1 | Being humble means not drawing attention to your what you do for others. 2 | 3 | Still act in a way consistent with your values, still correct others when needed, 4 | but do not draw attention to it specifically or boast. 5 | -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/osariel-humble.txt: -------------------------------------------------------------------------------- 1 | Being humble means recognising first and formost that I am fundamentally human. That I am made up of the same fundamental elements and materials as dogs, and worms, and flies. 2 | 3 | That aquiring wealth by the accident of my birth; or by the accident of my brain being wired in such a way that I am more "intelligent" than my next neighbour, does not confer superiority of self over them. Relative to the universe, we are insignificant. 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/paulofiles-humble.txt: -------------------------------------------------------------------------------- 1 | I believe being humble means that you treat all people with respect, regardless of who you are. 2 | -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/ramirezra-humble.txt: -------------------------------------------------------------------------------- 1 | To be humble means to act for the well-being of others without expectation of reward or recognition. 2 | -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/sagar424-humble.txt: -------------------------------------------------------------------------------- 1 | Being humble means being kind. You should not take your work for granted. This is what being humbe teaches you 2 | -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/sebagalan-humble.txt: -------------------------------------------------------------------------------- 1 | - The definition of humble is someone who knows they are not perfect. 2 | - Humble is defined as to lower the condition or position of someone or something. 3 | -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/senny-matrix-humble.txt: -------------------------------------------------------------------------------- 1 | Being HUMBLE means being down to earth as far as I am concerned. 2 | -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/shawnwollenberg-humble.txt: -------------------------------------------------------------------------------- 1 | To me being humble is knowing that no matter how much I know there is always more to learn and there are different ways to do things other than the way that I do them. I (along with everyone else) was born with only survival instincts... everything after that has been learned and might not have been learned in the best way. I believe it is important to listen to others, be open to their methods and be happy to show them what I know while explaining to them that there might be better ways. 2 | 3 | It's also important to remember that I am only one of ~7 billion people so it is impossible to be the best at what I do. I strive to be the best that I can be, but I wont be the best in the world which is comforting to know that there are people to learn from. 4 | 5 | Some skills that I am not good at I can try to learn, but it is ok to get help from others to achieve the best results. -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/stevenmaharaj-humble.txt: -------------------------------------------------------------------------------- 1 | Winning but not sticking it in other peoples faces. 2 | -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/tamdc2704-humble.txt: -------------------------------------------------------------------------------- 1 | Humble means not show off. 2 | 3 | Just act or talk enough what it should be. 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/02-humble/zaouldyeck-hunble.txt: -------------------------------------------------------------------------------- 1 | to marvel at the universe 2 | -------------------------------------------------------------------------------- /002-hands-on-exercises/03-purpose/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/golang-project/75dfb96f77d2ec61a22fe2949d09339d11e0bbbd/002-hands-on-exercises/03-purpose/.DS_Store -------------------------------------------------------------------------------- /002-hands-on-exercises/03-purpose/FanNoof-purpose.txt: -------------------------------------------------------------------------------- 1 | 101010 2 | -------------------------------------------------------------------------------- /002-hands-on-exercises/03-purpose/JayneJacobs-purpose.txt: -------------------------------------------------------------------------------- 1 | Family friends and other connections with people give us purpose. The purpose comes from knowing 2 | how you can contribute to the well-being of those you connect with and empathise with. Helping a 3 | child, or someone that is unable to help themselves is more a part of our own well-being as part 4 | of humanity. It is difficult to feel truely satisfied with prosperity or success if those you 5 | care about are suffering and this extends to all in our reach. Of course no one person can save 6 | the world but we each know what is truely in our power to change and contribute. 7 | 8 | -------------------------------------------------------------------------------- /002-hands-on-exercises/03-purpose/YvesJudeMatta-purpose.txt: -------------------------------------------------------------------------------- 1 | to evolve yourself to be the best you that you can be. -------------------------------------------------------------------------------- /002-hands-on-exercises/03-purpose/aorincon1-purpose.txt: -------------------------------------------------------------------------------- 1 | I believe that love gives human life purpose 2 | -------------------------------------------------------------------------------- /002-hands-on-exercises/03-purpose/arashjoya-purpose.txt: -------------------------------------------------------------------------------- 1 | Sense of belonging gives purpose to human life. -------------------------------------------------------------------------------- /002-hands-on-exercises/03-purpose/brian-d-albrecht-purpose.txt: -------------------------------------------------------------------------------- 1 | Experience, feel, and learn. Be the sentient sensory organs of a higher power. 2 | 3 | Either that, or we're just products of entropy in a cold universe and there isn't one. -------------------------------------------------------------------------------- /002-hands-on-exercises/03-purpose/bugul-noz-purpose.txt: -------------------------------------------------------------------------------- 1 | Wow, talk about a heavy question. :) 2 | 3 | Love, both giving and receiving, gives life purpose and meaning. -------------------------------------------------------------------------------- /002-hands-on-exercises/03-purpose/christianogguerra-purpose.txt: -------------------------------------------------------------------------------- 1 | Self-destructive, sometimes I think like humans are not protect nature and the consequence will be in the future 2 | Look at some poor continents and countries like Africa, Venezuela, Bolivia, Brazil, and so on. 3 | Amazona forests are devasted day by day, rivers very polluted, plastic in the ocean, and our ar. 4 | This purpose should be changed as soon as possible. 5 | -------------------------------------------------------------------------------- /002-hands-on-exercises/03-purpose/dani-santos-code.txt: -------------------------------------------------------------------------------- 1 | Collaboration gives purpose and meaning to human life 2 | 3 | Belonging 4 | 5 | Dicovering 6 | 7 | Building 8 | 9 | Sharing 10 | -------------------------------------------------------------------------------- /002-hands-on-exercises/03-purpose/dearrudam-purpose.txt: -------------------------------------------------------------------------------- 1 | The purpose of life for me is feeling that whatever you're doing and you've done could be meaningful and helpful for someone. 2 | It's about your legacy. It's something that makes me move ahead in this dangerous and sometimes unfair world. -------------------------------------------------------------------------------- /002-hands-on-exercises/03-purpose/dishar.jayantha.txt: -------------------------------------------------------------------------------- 1 | Just enjoy..... -------------------------------------------------------------------------------- /002-hands-on-exercises/03-purpose/ei09010-purpose.txt: -------------------------------------------------------------------------------- 1 | Humans are a random consequence of a sequence of very random events 2 | -------------------------------------------------------------------------------- /002-hands-on-exercises/03-purpose/ergeos-purpose.txt: -------------------------------------------------------------------------------- 1 | 42 2 | -------------------------------------------------------------------------------- /002-hands-on-exercises/03-purpose/git-aks-purpose.txt: -------------------------------------------------------------------------------- 1 | Make everything that you do, experience, interact with, better in this journey called life! -------------------------------------------------------------------------------- /002-hands-on-exercises/03-purpose/goestoeleven-purpose.txt: -------------------------------------------------------------------------------- 1 | Being important to others, and having others be important to you, is the purpose of human existence. 2 | 3 | Belonging, and community, has given the most meaning, purpose, and value to my life. 4 | 5 | This is supported by "The Harvard Adult Development" study. They found that individuals who have stronger communities have more meaningful and fulfilling lives. 6 | -------------------------------------------------------------------------------- /002-hands-on-exercises/03-purpose/hauk3wu1ff-purpose.txt: -------------------------------------------------------------------------------- 1 | My purpose in life is to be "to do no harm" and look after my family and 2 | friends. 3 | -------------------------------------------------------------------------------- /002-hands-on-exercises/03-purpose/imattf-purpose.txt: -------------------------------------------------------------------------------- 1 | What give purpose and meaning in life? Being there for others. -------------------------------------------------------------------------------- /002-hands-on-exercises/03-purpose/janosnanai-purpose.txt: -------------------------------------------------------------------------------- 1 | Deserted sand dunes 2 | Small snake determined to climb 3 | Always one more hill -------------------------------------------------------------------------------- /002-hands-on-exercises/03-purpose/jaronaearle-purpose.txt: -------------------------------------------------------------------------------- 1 | The bonds and companionship formed through climbing give life meaning. -------------------------------------------------------------------------------- /002-hands-on-exercises/03-purpose/joshroepke-purpose.txt: -------------------------------------------------------------------------------- 1 | 42 2 | -------------------------------------------------------------------------------- /002-hands-on-exercises/03-purpose/jpeeling13-purpose.txt: -------------------------------------------------------------------------------- 1 | I believe that family, friends, interests, discovery, knowledge and learning, and the belief in a higher calling all give purpose and meaning to human life. 2 | -------------------------------------------------------------------------------- /002-hands-on-exercises/03-purpose/kind84-purpose.txt: -------------------------------------------------------------------------------- 1 | Do God's will. 2 | -------------------------------------------------------------------------------- /002-hands-on-exercises/03-purpose/kwifrench-purpose.txt: -------------------------------------------------------------------------------- 1 | 42 2 | -------------------------------------------------------------------------------- /002-hands-on-exercises/03-purpose/liberate111-purpose.txt: -------------------------------------------------------------------------------- 1 | Think | Build | Develop | Solve something for humankind -------------------------------------------------------------------------------- /002-hands-on-exercises/03-purpose/manfredkogler-purpose.txt: -------------------------------------------------------------------------------- 1 | The puropse of life is life itself. -------------------------------------------------------------------------------- /002-hands-on-exercises/03-purpose/oralordos-purpose.txt: -------------------------------------------------------------------------------- 1 | 42 -------------------------------------------------------------------------------- /002-hands-on-exercises/03-purpose/osariel-purpose.txt: -------------------------------------------------------------------------------- 1 | The top assumes human need meaning in their lives. I am not sure what having purpose and meaning in life actually means. Pilling everything down to it's core, it seems to mean, that even if life has a purpose, we don't know what it is. Primarily, we satisfy these two basic things, hunger and procreation. Everything other thing is an addition, and serves these two fundamental goals; be it houses, cars, clothes, relationships etc. 2 | -------------------------------------------------------------------------------- /002-hands-on-exercises/03-purpose/sagar424-purpose.txt: -------------------------------------------------------------------------------- 1 | Purpose to do something great and fruitful to the mankind, for example coding and creating great stuff that can help hum race will provide meaning to life 2 | -------------------------------------------------------------------------------- /002-hands-on-exercises/03-purpose/sebagalan-purpose.txt: -------------------------------------------------------------------------------- 1 | The mission of human life is to end the miseries of material existence and attain a blissful life. We are constantly searching after happiness, but we often fail in our pursuit. We may get a glimpse of happiness, but it does not last forever. We do not want miseries, but we cannot avoid them. -------------------------------------------------------------------------------- /002-hands-on-exercises/03-purpose/senny-matrix-purpose.txt: -------------------------------------------------------------------------------- 1 | To understand the meaning of life, you have to answer these questions: 2 | 1. Who are you 3 | 2. Where are you coming from? 4 | 3. Why you are here? 5 | -------------------------------------------------------------------------------- /002-hands-on-exercises/03-purpose/tamdc2704-purpose.txt: -------------------------------------------------------------------------------- 1 | - Know what you are good at to focus on. 2 | - Have a family and kids. 3 | - Contribute to the society 4 | -------------------------------------------------------------------------------- /002-hands-on-exercises/03-purpose/temp-todd-mcleod-purpose.txt: -------------------------------------------------------------------------------- 1 | live for others 2 | relationships are everything 3 | when you put yourself second to the team, you feel good 4 | 5 | choose prosocial behavior 6 | not "anti-social" behavior 7 | 8 | you were built to be a social animal 9 | 10 | have a family and kids 11 | 12 | your life will be great 13 | -------------------------------------------------------------------------------- /002-hands-on-exercises/03-purpose/zaouldyeck-purpose.txt: -------------------------------------------------------------------------------- 1 | shared community, helping others, helping yourself, learn something and be good at it, teach it to others 2 | -------------------------------------------------------------------------------- /003-go-modules/00-russ-cox-article/russ-cox-our-software-dependency-problem.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/golang-project/75dfb96f77d2ec61a22fe2949d09339d11e0bbbd/003-go-modules/00-russ-cox-article/russ-cox-our-software-dependency-problem.pdf -------------------------------------------------------------------------------- /003-go-modules/01-create-module/hello.go: -------------------------------------------------------------------------------- 1 | package hello 2 | 3 | func Hello() string { 4 | return "Hello, world." 5 | } 6 | -------------------------------------------------------------------------------- /003-go-modules/01-create-module/hello_test.go: -------------------------------------------------------------------------------- 1 | package hello 2 | 3 | import "testing" 4 | 5 | func TestHello(t *testing.T) { 6 | want := "Hello, world." 7 | if got := Hello(); got != want { 8 | t.Errorf("Hello() = %q, want %q", got, want) 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /003-go-modules/02-adding-dependency/hello.go: -------------------------------------------------------------------------------- 1 | package hello 2 | 3 | import "rsc.io/quote" 4 | 5 | func Hello() string { 6 | return quote.Hello() 7 | } 8 | -------------------------------------------------------------------------------- /003-go-modules/02-adding-dependency/hello_test.go: -------------------------------------------------------------------------------- 1 | package hello 2 | 3 | import "testing" 4 | 5 | func TestHello(t *testing.T) { 6 | want := "Hello, world." 7 | if got := Hello(); got != want { 8 | t.Errorf("Hello() = %q, want %q", got, want) 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /003-go-modules/03-add-major-dependency/hello.go: -------------------------------------------------------------------------------- 1 | package hello 2 | 3 | import ( 4 | "rsc.io/quote" 5 | quoteV3 "rsc.io/quote/v3" 6 | ) 7 | 8 | func Hello() string { 9 | return quote.Hello() 10 | } 11 | 12 | func Proverb() string { 13 | return quoteV3.Concurrency() 14 | } 15 | -------------------------------------------------------------------------------- /003-go-modules/03-add-major-dependency/hello_test.go: -------------------------------------------------------------------------------- 1 | package hello 2 | 3 | import "testing" 4 | 5 | func TestHello(t *testing.T) { 6 | want := "Hello, world." 7 | if got := Hello(); got != want { 8 | t.Errorf("Hello() = %q, want %q", got, want) 9 | } 10 | } 11 | 12 | func TestProverb(t *testing.T) { 13 | want := "Concurrency is not parallelism." 14 | if got := Proverb(); got != want { 15 | t.Errorf("Proverb() = %q, want %q", got, want) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /003-go-modules/04-upgrading-major-dependency/hello.go: -------------------------------------------------------------------------------- 1 | package hello 2 | 3 | import ( 4 | "rsc.io/quote/v3" 5 | ) 6 | 7 | func Hello() string { 8 | return quote.HelloV3() 9 | } 10 | 11 | func Proverb() string { 12 | return quote.Concurrency() 13 | } 14 | -------------------------------------------------------------------------------- /003-go-modules/04-upgrading-major-dependency/hello_test.go: -------------------------------------------------------------------------------- 1 | package hello 2 | 3 | import "testing" 4 | 5 | func TestHello(t *testing.T) { 6 | want := "Hello, world." 7 | if got := Hello(); got != want { 8 | t.Errorf("Hello() = %q, want %q", got, want) 9 | } 10 | } 11 | 12 | func TestProverb(t *testing.T) { 13 | want := "Concurrency is not parallelism." 14 | if got := Proverb(); got != want { 15 | t.Errorf("Proverb() = %q, want %q", got, want) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /004-scrape/01-direct/scrape.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | 7 | "github.com/gocolly/colly" 8 | ) 9 | 10 | const site = "https://twitter.com/Todd_McLeod/status/1169751640926146560" 11 | 12 | type tweet struct { 13 | Name string 14 | Username string 15 | Message string 16 | } 17 | 18 | func main() { 19 | c := colly.NewCollector() 20 | 21 | messages := []tweet{} 22 | 23 | c.OnHTML(".tweet", func(e *colly.HTMLElement) { 24 | messages = append(messages, tweet{ 25 | Name: e.ChildText(".account-group .fullname"), 26 | Username: e.ChildText(".account-group .username"), 27 | Message: e.ChildText(".tweet-text"), 28 | }) 29 | }) 30 | 31 | err := c.Visit(site) 32 | if err != nil { 33 | panic(err) 34 | } 35 | 36 | c.Wait() 37 | 38 | bs, err := json.MarshalIndent(messages, "", "\t") 39 | if err != nil { 40 | panic(err) 41 | } 42 | 43 | fmt.Println(string(bs)) 44 | fmt.Println("Number of tweets:", len(messages)) 45 | } 46 | -------------------------------------------------------------------------------- /004-scrape/02-api/scrape.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | "net/http" 7 | "net/url" 8 | "strings" 9 | "time" 10 | 11 | "github.com/PuerkitoBio/goquery" 12 | ) 13 | 14 | const site = "https://twitter.com/i/Todd_McLeod/conversation/1169751640926146560" 15 | 16 | type tweet struct { 17 | Name string 18 | Username string 19 | Message string 20 | } 21 | 22 | type conversationResponse struct { 23 | MinPos string `json:"min_position"` 24 | More bool `json:"has_more_items"` 25 | Html string `json:"items_html"` 26 | } 27 | 28 | func makeConversationRequest(maxPos string) (*conversationResponse, error) { 29 | params := url.Values{} 30 | params.Set("include_available_features", "1") 31 | params.Set("include_entities", "1") 32 | params.Set("max_position", maxPos) 33 | params.Set("reset_error_state", "false") 34 | 35 | url := site + "?" + params.Encode() 36 | resp, err := http.Get(url) 37 | if err != nil { 38 | return nil, fmt.Errorf("Error while getting conversation data: %w", err) 39 | } 40 | defer resp.Body.Close() 41 | 42 | if resp.StatusCode != http.StatusOK { 43 | return nil, fmt.Errorf("Incorrect http status code: %d %s", resp.StatusCode, http.StatusText(resp.StatusCode)) 44 | } 45 | 46 | cr := &conversationResponse{} 47 | err = json.NewDecoder(resp.Body).Decode(cr) 48 | if err != nil { 49 | return nil, fmt.Errorf("Error while decoding response: %w", err) 50 | } 51 | 52 | return cr, nil 53 | } 54 | 55 | func getConversation() ([]string, error) { 56 | continueCode := "" 57 | messages := []string{} 58 | 59 | for i := 0; i < 50; i++ { 60 | resp, err := makeConversationRequest(continueCode) 61 | if err != nil { 62 | return nil, fmt.Errorf("Unable to make conversation request: %w", err) 63 | } 64 | 65 | messages = append(messages, resp.Html) 66 | 67 | if !resp.More { 68 | break 69 | } 70 | 71 | continueCode = resp.MinPos 72 | time.Sleep(time.Second) 73 | } 74 | 75 | return messages, nil 76 | } 77 | 78 | func parseHtml(message string) ([]tweet, error) { 79 | rdr := strings.NewReader(message) 80 | doc, err := goquery.NewDocumentFromReader(rdr) 81 | if err != nil { 82 | return nil, fmt.Errorf("Unable to read html: %w", err) 83 | } 84 | 85 | ts := []tweet{} 86 | 87 | doc.Find(".tweet").Each(func(i int, s *goquery.Selection) { 88 | ts = append(ts, tweet{ 89 | Name: s.Find(".account-group .fullname").Text(), 90 | Username: s.Find(".account-group .username").Text(), 91 | Message: s.Find(".tweet-text").Text(), 92 | }) 93 | }) 94 | 95 | return ts, nil 96 | } 97 | 98 | func main() { 99 | resp, err := getConversation() 100 | if err != nil { 101 | panic(err) 102 | } 103 | 104 | tweets := []tweet{} 105 | for _, msg := range resp { 106 | ts, err := parseHtml(msg) 107 | if err != nil { 108 | panic(err) 109 | } 110 | tweets = append(tweets, ts...) 111 | } 112 | 113 | bs, err := json.MarshalIndent(tweets, "", "\t") 114 | if err != nil { 115 | panic(err) 116 | } 117 | 118 | fmt.Println(string(bs)) 119 | fmt.Println("Number of tweets:", len(tweets)) 120 | } 121 | -------------------------------------------------------------------------------- /004-scrape/03-analysis/scrape.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | "net/http" 7 | "net/url" 8 | "sort" 9 | "strings" 10 | "time" 11 | 12 | "github.com/PuerkitoBio/goquery" 13 | ) 14 | 15 | const site = "https://twitter.com/i/Todd_McLeod/conversation/1169751640926146560" 16 | 17 | type tweet struct { 18 | Name string 19 | Username string 20 | Message string 21 | } 22 | 23 | type conversationResponse struct { 24 | MinPos string `json:"min_position"` 25 | More bool `json:"has_more_items"` 26 | Html string `json:"items_html"` 27 | } 28 | 29 | func makeConversationRequest(maxPos string) (*conversationResponse, error) { 30 | params := url.Values{} 31 | params.Set("include_available_features", "1") 32 | params.Set("include_entities", "1") 33 | params.Set("max_position", maxPos) 34 | params.Set("reset_error_state", "false") 35 | 36 | url := site + "?" + params.Encode() 37 | resp, err := http.Get(url) 38 | if err != nil { 39 | return nil, fmt.Errorf("Error while getting conversation data: %w", err) 40 | } 41 | defer resp.Body.Close() 42 | 43 | if resp.StatusCode != http.StatusOK { 44 | return nil, fmt.Errorf("Incorrect http status code: %d %s", resp.StatusCode, http.StatusText(resp.StatusCode)) 45 | } 46 | 47 | cr := &conversationResponse{} 48 | err = json.NewDecoder(resp.Body).Decode(cr) 49 | if err != nil { 50 | return nil, fmt.Errorf("Error while decoding response: %w", err) 51 | } 52 | 53 | return cr, nil 54 | } 55 | 56 | func getConversation() ([]string, error) { 57 | continueCode := "" 58 | messages := []string{} 59 | 60 | for i := 0; i < 50; i++ { 61 | resp, err := makeConversationRequest(continueCode) 62 | if err != nil { 63 | return nil, fmt.Errorf("Unable to make conversation request: %w", err) 64 | } 65 | 66 | messages = append(messages, resp.Html) 67 | 68 | if !resp.More { 69 | break 70 | } 71 | 72 | continueCode = resp.MinPos 73 | time.Sleep(time.Second) 74 | } 75 | 76 | return messages, nil 77 | } 78 | 79 | func parseHtml(message string) ([]tweet, error) { 80 | rdr := strings.NewReader(message) 81 | doc, err := goquery.NewDocumentFromReader(rdr) 82 | if err != nil { 83 | return nil, fmt.Errorf("Unable to read html: %w", err) 84 | } 85 | 86 | ts := []tweet{} 87 | 88 | doc.Find(".tweet").Each(func(i int, s *goquery.Selection) { 89 | ts = append(ts, tweet{ 90 | Name: s.Find(".account-group .fullname").Text(), 91 | Username: s.Find(".account-group .username").Text(), 92 | Message: s.Find(".tweet-text").Text(), 93 | }) 94 | }) 95 | 96 | return ts, nil 97 | } 98 | 99 | func dumpTweets(tweets []tweet) { 100 | bs, err := json.MarshalIndent(tweets, "", "\t") 101 | if err != nil { 102 | panic(err) 103 | } 104 | 105 | fmt.Println(string(bs)) 106 | fmt.Println("Number of tweets:", len(tweets)) 107 | } 108 | 109 | type wordInfo struct { 110 | word string 111 | count int 112 | } 113 | 114 | func wordCount(tweets []tweet) []wordInfo { 115 | wordMap := map[string]int{} 116 | 117 | for _, t := range tweets { 118 | words := strings.Split(t.Message, " ") 119 | for _, w := range words { 120 | wordMap[strings.ToLower(w)]++ 121 | } 122 | } 123 | 124 | wis := []wordInfo{} 125 | for w, c := range wordMap { 126 | wis = append(wis, wordInfo{ 127 | word: w, 128 | count: c, 129 | }) 130 | } 131 | 132 | sort.Slice(wis, func(i, j int) bool { 133 | return wis[i].count > wis[j].count 134 | }) 135 | 136 | return wis 137 | } 138 | 139 | func main() { 140 | resp, err := getConversation() 141 | if err != nil { 142 | panic(err) 143 | } 144 | 145 | tweets := []tweet{} 146 | for _, msg := range resp { 147 | ts, err := parseHtml(msg) 148 | if err != nil { 149 | panic(err) 150 | } 151 | tweets = append(tweets, ts...) 152 | } 153 | 154 | sortedCounts := wordCount(tweets) 155 | for _, v := range sortedCounts { 156 | fmt.Printf("%s: %d\n", v.word, v.count) 157 | } 158 | } 159 | -------------------------------------------------------------------------------- /004-scrape/04-homework/02-todd-solution/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | "time" 7 | 8 | "github.com/gocolly/colly" 9 | ) 10 | 11 | type item struct { 12 | StoryURL string 13 | Source string 14 | comments string 15 | CrawledAt time.Time 16 | Comments string 17 | Title string 18 | } 19 | 20 | func main() { 21 | stories := []item{} 22 | // Instantiate default collector 23 | c := colly.NewCollector( 24 | // Visit only domains: old.reddit.com 25 | colly.AllowedDomains("old.reddit.com"), 26 | colly.Async(true), 27 | ) 28 | 29 | // On every a element which has .top-matter attribute call callback 30 | // This class is unique to the div that holds all information about a story 31 | c.OnHTML(".top-matter", func(e *colly.HTMLElement) { 32 | temp := item{} 33 | temp.StoryURL = e.ChildAttr("a[data-event-action=title]", "href") 34 | temp.Source = "https://old.reddit.com/r/programming/" 35 | temp.Title = e.ChildText("a[data-event-action=title]") 36 | temp.Comments = e.ChildAttr("a[data-event-action=comments]", "href") 37 | temp.CrawledAt = time.Now() 38 | stories = append(stories, temp) 39 | }) 40 | 41 | // On every span tag with the class next-button 42 | c.OnHTML("span.next-button", func(h *colly.HTMLElement) { 43 | t := h.ChildAttr("a", "href") 44 | c.Visit(t) 45 | }) 46 | 47 | // Set max Parallelism and introduce a Random Delay 48 | c.Limit(&colly.LimitRule{ 49 | Parallelism: 2, 50 | RandomDelay: 5 * time.Second, 51 | }) 52 | 53 | // Before making a request print "Visiting ..." 54 | c.OnRequest(func(r *colly.Request) { 55 | fmt.Println("Visiting", r.URL.String()) 56 | 57 | }) 58 | 59 | // Crawl all reddits the user passes in 60 | reddits := os.Args[1:] 61 | for _, reddit := range reddits { 62 | c.Visit(reddit) 63 | 64 | } 65 | 66 | c.Wait() 67 | fmt.Println(stories) 68 | 69 | } 70 | -------------------------------------------------------------------------------- /004-scrape/04-homework/03-todd-solution/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | "sort" 7 | "strings" 8 | "time" 9 | 10 | "github.com/gocolly/colly" 11 | ) 12 | 13 | type item struct { 14 | StoryURL string 15 | Source string 16 | comments string 17 | CrawledAt time.Time 18 | Comments string 19 | Title string 20 | } 21 | 22 | func main() { 23 | stories := []item{} 24 | // Instantiate default collector 25 | c := colly.NewCollector( 26 | // Visit only domains: old.reddit.com 27 | colly.AllowedDomains("old.reddit.com"), 28 | colly.Async(true), 29 | ) 30 | 31 | // On every a element which has .top-matter attribute call callback 32 | // This class is unique to the div that holds all information about a story 33 | c.OnHTML(".top-matter", func(e *colly.HTMLElement) { 34 | temp := item{} 35 | temp.StoryURL = e.ChildAttr("a[data-event-action=title]", "href") 36 | temp.Source = "https://old.reddit.com/r/programming/" 37 | temp.Title = e.ChildText("a[data-event-action=title]") 38 | temp.Comments = e.ChildAttr("a[data-event-action=comments]", "href") 39 | temp.CrawledAt = time.Now() 40 | stories = append(stories, temp) 41 | }) 42 | 43 | // On every span tag with the class next-button 44 | c.OnHTML("span.next-button", func(h *colly.HTMLElement) { 45 | t := h.ChildAttr("a", "href") 46 | c.Visit(t) 47 | }) 48 | 49 | // Set max Parallelism and introduce a Random Delay 50 | c.Limit(&colly.LimitRule{ 51 | Parallelism: 2, 52 | RandomDelay: 5 * time.Second, 53 | }) 54 | 55 | // Before making a request print "Visiting ..." 56 | c.OnRequest(func(r *colly.Request) { 57 | fmt.Println("Visiting", r.URL.String()) 58 | 59 | }) 60 | 61 | // Crawl all reddits the user passes in 62 | reddits := os.Args[1:] 63 | for _, reddit := range reddits { 64 | c.Visit(reddit) 65 | 66 | } 67 | 68 | c.Wait() 69 | // fmt.Println(stories) 70 | 71 | m := map[string]int{} 72 | 73 | for _, story := range stories { 74 | words := strings.Split(strings.ToLower(story.Title), " ") 75 | for _, word := range words { 76 | m[word]++ 77 | } 78 | } 79 | 80 | type wordCount struct { 81 | word string 82 | count int 83 | } 84 | 85 | xwc := []wordCount{} 86 | 87 | for w, c := range m { 88 | xwc = append(xwc, wordCount{ 89 | word: w, 90 | count: c, 91 | }) 92 | } 93 | 94 | sort.Slice(xwc, func(i, j int) bool { 95 | return xwc[i].count > xwc[j].count 96 | }) 97 | 98 | for _, v := range xwc { 99 | fmt.Println(v.word, v.count) 100 | } 101 | 102 | } 103 | -------------------------------------------------------------------------------- /005-grpc/01-proto/echo/echo.pb.go: -------------------------------------------------------------------------------- 1 | // Code generated by protoc-gen-go. DO NOT EDIT. 2 | // source: echo.proto 3 | 4 | package echo 5 | 6 | import ( 7 | context "context" 8 | fmt "fmt" 9 | proto "github.com/golang/protobuf/proto" 10 | grpc "google.golang.org/grpc" 11 | math "math" 12 | ) 13 | 14 | // Reference imports to suppress errors if they are not otherwise used. 15 | var _ = proto.Marshal 16 | var _ = fmt.Errorf 17 | var _ = math.Inf 18 | 19 | // This is a compile-time assertion to ensure that this generated file 20 | // is compatible with the proto package it is being compiled against. 21 | // A compilation error at this line likely means your copy of the 22 | // proto package needs to be updated. 23 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package 24 | 25 | type EchoRequest struct { 26 | Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` 27 | XXX_NoUnkeyedLiteral struct{} `json:"-"` 28 | XXX_unrecognized []byte `json:"-"` 29 | XXX_sizecache int32 `json:"-"` 30 | } 31 | 32 | func (m *EchoRequest) Reset() { *m = EchoRequest{} } 33 | func (m *EchoRequest) String() string { return proto.CompactTextString(m) } 34 | func (*EchoRequest) ProtoMessage() {} 35 | func (*EchoRequest) Descriptor() ([]byte, []int) { 36 | return fileDescriptor_08134aea513e0001, []int{0} 37 | } 38 | 39 | func (m *EchoRequest) XXX_Unmarshal(b []byte) error { 40 | return xxx_messageInfo_EchoRequest.Unmarshal(m, b) 41 | } 42 | func (m *EchoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 43 | return xxx_messageInfo_EchoRequest.Marshal(b, m, deterministic) 44 | } 45 | func (m *EchoRequest) XXX_Merge(src proto.Message) { 46 | xxx_messageInfo_EchoRequest.Merge(m, src) 47 | } 48 | func (m *EchoRequest) XXX_Size() int { 49 | return xxx_messageInfo_EchoRequest.Size(m) 50 | } 51 | func (m *EchoRequest) XXX_DiscardUnknown() { 52 | xxx_messageInfo_EchoRequest.DiscardUnknown(m) 53 | } 54 | 55 | var xxx_messageInfo_EchoRequest proto.InternalMessageInfo 56 | 57 | func (m *EchoRequest) GetMessage() string { 58 | if m != nil { 59 | return m.Message 60 | } 61 | return "" 62 | } 63 | 64 | type EchoResponse struct { 65 | Response string `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` 66 | XXX_NoUnkeyedLiteral struct{} `json:"-"` 67 | XXX_unrecognized []byte `json:"-"` 68 | XXX_sizecache int32 `json:"-"` 69 | } 70 | 71 | func (m *EchoResponse) Reset() { *m = EchoResponse{} } 72 | func (m *EchoResponse) String() string { return proto.CompactTextString(m) } 73 | func (*EchoResponse) ProtoMessage() {} 74 | func (*EchoResponse) Descriptor() ([]byte, []int) { 75 | return fileDescriptor_08134aea513e0001, []int{1} 76 | } 77 | 78 | func (m *EchoResponse) XXX_Unmarshal(b []byte) error { 79 | return xxx_messageInfo_EchoResponse.Unmarshal(m, b) 80 | } 81 | func (m *EchoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 82 | return xxx_messageInfo_EchoResponse.Marshal(b, m, deterministic) 83 | } 84 | func (m *EchoResponse) XXX_Merge(src proto.Message) { 85 | xxx_messageInfo_EchoResponse.Merge(m, src) 86 | } 87 | func (m *EchoResponse) XXX_Size() int { 88 | return xxx_messageInfo_EchoResponse.Size(m) 89 | } 90 | func (m *EchoResponse) XXX_DiscardUnknown() { 91 | xxx_messageInfo_EchoResponse.DiscardUnknown(m) 92 | } 93 | 94 | var xxx_messageInfo_EchoResponse proto.InternalMessageInfo 95 | 96 | func (m *EchoResponse) GetResponse() string { 97 | if m != nil { 98 | return m.Response 99 | } 100 | return "" 101 | } 102 | 103 | func init() { 104 | proto.RegisterType((*EchoRequest)(nil), "EchoRequest") 105 | proto.RegisterType((*EchoResponse)(nil), "EchoResponse") 106 | } 107 | 108 | func init() { proto.RegisterFile("echo.proto", fileDescriptor_08134aea513e0001) } 109 | 110 | var fileDescriptor_08134aea513e0001 = []byte{ 111 | // 129 bytes of a gzipped FileDescriptorProto 112 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4a, 0x4d, 0xce, 0xc8, 113 | 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x57, 0x52, 0xe7, 0xe2, 0x76, 0x4d, 0xce, 0xc8, 0x0f, 0x4a, 114 | 0x2d, 0x2c, 0x4d, 0x2d, 0x2e, 0x11, 0x92, 0xe0, 0x62, 0xcf, 0x4d, 0x2d, 0x2e, 0x4e, 0x4c, 0x4f, 115 | 0x95, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x82, 0x71, 0x95, 0xb4, 0xb8, 0x78, 0x20, 0x0a, 0x8b, 116 | 0x0b, 0xf2, 0xf3, 0x8a, 0x53, 0x85, 0xa4, 0xb8, 0x38, 0x8a, 0xa0, 0x6c, 0xa8, 0x52, 0x38, 0xdf, 117 | 0xc8, 0x98, 0x8b, 0x0b, 0xa4, 0x36, 0x38, 0xb5, 0xa8, 0x2c, 0xb5, 0x48, 0x48, 0x95, 0x8b, 0x05, 118 | 0xc4, 0x13, 0xe2, 0xd1, 0x43, 0xb2, 0x49, 0x8a, 0x57, 0x0f, 0xd9, 0x38, 0x25, 0x86, 0x24, 0x36, 119 | 0xb0, 0x83, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x88, 0x1c, 0x34, 0x83, 0x9e, 0x00, 0x00, 120 | 0x00, 121 | } 122 | 123 | // Reference imports to suppress errors if they are not otherwise used. 124 | var _ context.Context 125 | var _ grpc.ClientConn 126 | 127 | // This is a compile-time assertion to ensure that this generated file 128 | // is compatible with the grpc package it is being compiled against. 129 | const _ = grpc.SupportPackageIsVersion4 130 | 131 | // EchoServerClient is the client API for EchoServer service. 132 | // 133 | // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 134 | type EchoServerClient interface { 135 | Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) 136 | } 137 | 138 | type echoServerClient struct { 139 | cc *grpc.ClientConn 140 | } 141 | 142 | func NewEchoServerClient(cc *grpc.ClientConn) EchoServerClient { 143 | return &echoServerClient{cc} 144 | } 145 | 146 | func (c *echoServerClient) Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) { 147 | out := new(EchoResponse) 148 | err := c.cc.Invoke(ctx, "/EchoServer/Echo", in, out, opts...) 149 | if err != nil { 150 | return nil, err 151 | } 152 | return out, nil 153 | } 154 | 155 | // EchoServerServer is the server API for EchoServer service. 156 | type EchoServerServer interface { 157 | Echo(context.Context, *EchoRequest) (*EchoResponse, error) 158 | } 159 | 160 | func RegisterEchoServerServer(s *grpc.Server, srv EchoServerServer) { 161 | s.RegisterService(&_EchoServer_serviceDesc, srv) 162 | } 163 | 164 | func _EchoServer_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 165 | in := new(EchoRequest) 166 | if err := dec(in); err != nil { 167 | return nil, err 168 | } 169 | if interceptor == nil { 170 | return srv.(EchoServerServer).Echo(ctx, in) 171 | } 172 | info := &grpc.UnaryServerInfo{ 173 | Server: srv, 174 | FullMethod: "/EchoServer/Echo", 175 | } 176 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { 177 | return srv.(EchoServerServer).Echo(ctx, req.(*EchoRequest)) 178 | } 179 | return interceptor(ctx, in, info, handler) 180 | } 181 | 182 | var _EchoServer_serviceDesc = grpc.ServiceDesc{ 183 | ServiceName: "EchoServer", 184 | HandlerType: (*EchoServerServer)(nil), 185 | Methods: []grpc.MethodDesc{ 186 | { 187 | MethodName: "Echo", 188 | Handler: _EchoServer_Echo_Handler, 189 | }, 190 | }, 191 | Streams: []grpc.StreamDesc{}, 192 | Metadata: "echo.proto", 193 | } 194 | -------------------------------------------------------------------------------- /005-grpc/01-proto/echo/echo.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | service EchoServer { 4 | rpc Echo(EchoRequest) returns (EchoResponse) {} 5 | } 6 | 7 | message EchoRequest { 8 | string message = 1; 9 | } 10 | 11 | message EchoResponse { 12 | string response = 1; 13 | } 14 | -------------------------------------------------------------------------------- /005-grpc/02-server/echo/echo.pb.go: -------------------------------------------------------------------------------- 1 | // Code generated by protoc-gen-go. DO NOT EDIT. 2 | // source: echo.proto 3 | 4 | package echo 5 | 6 | import ( 7 | context "context" 8 | fmt "fmt" 9 | proto "github.com/golang/protobuf/proto" 10 | grpc "google.golang.org/grpc" 11 | math "math" 12 | ) 13 | 14 | // Reference imports to suppress errors if they are not otherwise used. 15 | var _ = proto.Marshal 16 | var _ = fmt.Errorf 17 | var _ = math.Inf 18 | 19 | // This is a compile-time assertion to ensure that this generated file 20 | // is compatible with the proto package it is being compiled against. 21 | // A compilation error at this line likely means your copy of the 22 | // proto package needs to be updated. 23 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package 24 | 25 | type EchoRequest struct { 26 | Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` 27 | XXX_NoUnkeyedLiteral struct{} `json:"-"` 28 | XXX_unrecognized []byte `json:"-"` 29 | XXX_sizecache int32 `json:"-"` 30 | } 31 | 32 | func (m *EchoRequest) Reset() { *m = EchoRequest{} } 33 | func (m *EchoRequest) String() string { return proto.CompactTextString(m) } 34 | func (*EchoRequest) ProtoMessage() {} 35 | func (*EchoRequest) Descriptor() ([]byte, []int) { 36 | return fileDescriptor_08134aea513e0001, []int{0} 37 | } 38 | 39 | func (m *EchoRequest) XXX_Unmarshal(b []byte) error { 40 | return xxx_messageInfo_EchoRequest.Unmarshal(m, b) 41 | } 42 | func (m *EchoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 43 | return xxx_messageInfo_EchoRequest.Marshal(b, m, deterministic) 44 | } 45 | func (m *EchoRequest) XXX_Merge(src proto.Message) { 46 | xxx_messageInfo_EchoRequest.Merge(m, src) 47 | } 48 | func (m *EchoRequest) XXX_Size() int { 49 | return xxx_messageInfo_EchoRequest.Size(m) 50 | } 51 | func (m *EchoRequest) XXX_DiscardUnknown() { 52 | xxx_messageInfo_EchoRequest.DiscardUnknown(m) 53 | } 54 | 55 | var xxx_messageInfo_EchoRequest proto.InternalMessageInfo 56 | 57 | func (m *EchoRequest) GetMessage() string { 58 | if m != nil { 59 | return m.Message 60 | } 61 | return "" 62 | } 63 | 64 | type EchoResponse struct { 65 | Response string `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` 66 | XXX_NoUnkeyedLiteral struct{} `json:"-"` 67 | XXX_unrecognized []byte `json:"-"` 68 | XXX_sizecache int32 `json:"-"` 69 | } 70 | 71 | func (m *EchoResponse) Reset() { *m = EchoResponse{} } 72 | func (m *EchoResponse) String() string { return proto.CompactTextString(m) } 73 | func (*EchoResponse) ProtoMessage() {} 74 | func (*EchoResponse) Descriptor() ([]byte, []int) { 75 | return fileDescriptor_08134aea513e0001, []int{1} 76 | } 77 | 78 | func (m *EchoResponse) XXX_Unmarshal(b []byte) error { 79 | return xxx_messageInfo_EchoResponse.Unmarshal(m, b) 80 | } 81 | func (m *EchoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 82 | return xxx_messageInfo_EchoResponse.Marshal(b, m, deterministic) 83 | } 84 | func (m *EchoResponse) XXX_Merge(src proto.Message) { 85 | xxx_messageInfo_EchoResponse.Merge(m, src) 86 | } 87 | func (m *EchoResponse) XXX_Size() int { 88 | return xxx_messageInfo_EchoResponse.Size(m) 89 | } 90 | func (m *EchoResponse) XXX_DiscardUnknown() { 91 | xxx_messageInfo_EchoResponse.DiscardUnknown(m) 92 | } 93 | 94 | var xxx_messageInfo_EchoResponse proto.InternalMessageInfo 95 | 96 | func (m *EchoResponse) GetResponse() string { 97 | if m != nil { 98 | return m.Response 99 | } 100 | return "" 101 | } 102 | 103 | func init() { 104 | proto.RegisterType((*EchoRequest)(nil), "EchoRequest") 105 | proto.RegisterType((*EchoResponse)(nil), "EchoResponse") 106 | } 107 | 108 | func init() { proto.RegisterFile("echo.proto", fileDescriptor_08134aea513e0001) } 109 | 110 | var fileDescriptor_08134aea513e0001 = []byte{ 111 | // 129 bytes of a gzipped FileDescriptorProto 112 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4a, 0x4d, 0xce, 0xc8, 113 | 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x57, 0x52, 0xe7, 0xe2, 0x76, 0x4d, 0xce, 0xc8, 0x0f, 0x4a, 114 | 0x2d, 0x2c, 0x4d, 0x2d, 0x2e, 0x11, 0x92, 0xe0, 0x62, 0xcf, 0x4d, 0x2d, 0x2e, 0x4e, 0x4c, 0x4f, 115 | 0x95, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x82, 0x71, 0x95, 0xb4, 0xb8, 0x78, 0x20, 0x0a, 0x8b, 116 | 0x0b, 0xf2, 0xf3, 0x8a, 0x53, 0x85, 0xa4, 0xb8, 0x38, 0x8a, 0xa0, 0x6c, 0xa8, 0x52, 0x38, 0xdf, 117 | 0xc8, 0x98, 0x8b, 0x0b, 0xa4, 0x36, 0x38, 0xb5, 0xa8, 0x2c, 0xb5, 0x48, 0x48, 0x95, 0x8b, 0x05, 118 | 0xc4, 0x13, 0xe2, 0xd1, 0x43, 0xb2, 0x49, 0x8a, 0x57, 0x0f, 0xd9, 0x38, 0x25, 0x86, 0x24, 0x36, 119 | 0xb0, 0x83, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x88, 0x1c, 0x34, 0x83, 0x9e, 0x00, 0x00, 120 | 0x00, 121 | } 122 | 123 | // Reference imports to suppress errors if they are not otherwise used. 124 | var _ context.Context 125 | var _ grpc.ClientConn 126 | 127 | // This is a compile-time assertion to ensure that this generated file 128 | // is compatible with the grpc package it is being compiled against. 129 | const _ = grpc.SupportPackageIsVersion4 130 | 131 | // EchoServerClient is the client API for EchoServer service. 132 | // 133 | // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 134 | type EchoServerClient interface { 135 | Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) 136 | } 137 | 138 | type echoServerClient struct { 139 | cc *grpc.ClientConn 140 | } 141 | 142 | func NewEchoServerClient(cc *grpc.ClientConn) EchoServerClient { 143 | return &echoServerClient{cc} 144 | } 145 | 146 | func (c *echoServerClient) Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) { 147 | out := new(EchoResponse) 148 | err := c.cc.Invoke(ctx, "/EchoServer/Echo", in, out, opts...) 149 | if err != nil { 150 | return nil, err 151 | } 152 | return out, nil 153 | } 154 | 155 | // EchoServerServer is the server API for EchoServer service. 156 | type EchoServerServer interface { 157 | Echo(context.Context, *EchoRequest) (*EchoResponse, error) 158 | } 159 | 160 | func RegisterEchoServerServer(s *grpc.Server, srv EchoServerServer) { 161 | s.RegisterService(&_EchoServer_serviceDesc, srv) 162 | } 163 | 164 | func _EchoServer_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 165 | in := new(EchoRequest) 166 | if err := dec(in); err != nil { 167 | return nil, err 168 | } 169 | if interceptor == nil { 170 | return srv.(EchoServerServer).Echo(ctx, in) 171 | } 172 | info := &grpc.UnaryServerInfo{ 173 | Server: srv, 174 | FullMethod: "/EchoServer/Echo", 175 | } 176 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { 177 | return srv.(EchoServerServer).Echo(ctx, req.(*EchoRequest)) 178 | } 179 | return interceptor(ctx, in, info, handler) 180 | } 181 | 182 | var _EchoServer_serviceDesc = grpc.ServiceDesc{ 183 | ServiceName: "EchoServer", 184 | HandlerType: (*EchoServerServer)(nil), 185 | Methods: []grpc.MethodDesc{ 186 | { 187 | MethodName: "Echo", 188 | Handler: _EchoServer_Echo_Handler, 189 | }, 190 | }, 191 | Streams: []grpc.StreamDesc{}, 192 | Metadata: "echo.proto", 193 | } 194 | -------------------------------------------------------------------------------- /005-grpc/02-server/echo/echo.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | service EchoServer { 4 | rpc Echo(EchoRequest) returns (EchoResponse) {} 5 | } 6 | 7 | message EchoRequest { 8 | string message = 1; 9 | } 10 | 11 | message EchoResponse { 12 | string response = 1; 13 | } 14 | -------------------------------------------------------------------------------- /005-grpc/02-server/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "context" 5 | "fmt" 6 | "net" 7 | 8 | "github.com/GoesToEleven/golang-project/005-grpc/02-server/echo" 9 | "google.golang.org/grpc" 10 | ) 11 | 12 | type EchoServer struct{} 13 | 14 | func (e *EchoServer) Echo(ctx context.Context, req *echo.EchoRequest) (*echo.EchoResponse, error) { 15 | return &echo.EchoResponse{ 16 | Response: "My Echo: " + req.Message, 17 | }, nil 18 | } 19 | 20 | func main() { 21 | lst, err := net.Listen("tcp", ":8080") 22 | if err != nil { 23 | panic(err) 24 | } 25 | 26 | s := grpc.NewServer() 27 | 28 | srv := &EchoServer{} 29 | echo.RegisterEchoServerServer(s, srv) 30 | 31 | fmt.Println("Now serving at port 8080") 32 | err = s.Serve(lst) 33 | if err != nil { 34 | panic(err) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /005-grpc/03-client/echo/echo.pb.go: -------------------------------------------------------------------------------- 1 | // Code generated by protoc-gen-go. DO NOT EDIT. 2 | // source: echo.proto 3 | 4 | package echo 5 | 6 | import ( 7 | context "context" 8 | fmt "fmt" 9 | proto "github.com/golang/protobuf/proto" 10 | grpc "google.golang.org/grpc" 11 | math "math" 12 | ) 13 | 14 | // Reference imports to suppress errors if they are not otherwise used. 15 | var _ = proto.Marshal 16 | var _ = fmt.Errorf 17 | var _ = math.Inf 18 | 19 | // This is a compile-time assertion to ensure that this generated file 20 | // is compatible with the proto package it is being compiled against. 21 | // A compilation error at this line likely means your copy of the 22 | // proto package needs to be updated. 23 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package 24 | 25 | type EchoRequest struct { 26 | Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` 27 | XXX_NoUnkeyedLiteral struct{} `json:"-"` 28 | XXX_unrecognized []byte `json:"-"` 29 | XXX_sizecache int32 `json:"-"` 30 | } 31 | 32 | func (m *EchoRequest) Reset() { *m = EchoRequest{} } 33 | func (m *EchoRequest) String() string { return proto.CompactTextString(m) } 34 | func (*EchoRequest) ProtoMessage() {} 35 | func (*EchoRequest) Descriptor() ([]byte, []int) { 36 | return fileDescriptor_08134aea513e0001, []int{0} 37 | } 38 | 39 | func (m *EchoRequest) XXX_Unmarshal(b []byte) error { 40 | return xxx_messageInfo_EchoRequest.Unmarshal(m, b) 41 | } 42 | func (m *EchoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 43 | return xxx_messageInfo_EchoRequest.Marshal(b, m, deterministic) 44 | } 45 | func (m *EchoRequest) XXX_Merge(src proto.Message) { 46 | xxx_messageInfo_EchoRequest.Merge(m, src) 47 | } 48 | func (m *EchoRequest) XXX_Size() int { 49 | return xxx_messageInfo_EchoRequest.Size(m) 50 | } 51 | func (m *EchoRequest) XXX_DiscardUnknown() { 52 | xxx_messageInfo_EchoRequest.DiscardUnknown(m) 53 | } 54 | 55 | var xxx_messageInfo_EchoRequest proto.InternalMessageInfo 56 | 57 | func (m *EchoRequest) GetMessage() string { 58 | if m != nil { 59 | return m.Message 60 | } 61 | return "" 62 | } 63 | 64 | type EchoResponse struct { 65 | Response string `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` 66 | XXX_NoUnkeyedLiteral struct{} `json:"-"` 67 | XXX_unrecognized []byte `json:"-"` 68 | XXX_sizecache int32 `json:"-"` 69 | } 70 | 71 | func (m *EchoResponse) Reset() { *m = EchoResponse{} } 72 | func (m *EchoResponse) String() string { return proto.CompactTextString(m) } 73 | func (*EchoResponse) ProtoMessage() {} 74 | func (*EchoResponse) Descriptor() ([]byte, []int) { 75 | return fileDescriptor_08134aea513e0001, []int{1} 76 | } 77 | 78 | func (m *EchoResponse) XXX_Unmarshal(b []byte) error { 79 | return xxx_messageInfo_EchoResponse.Unmarshal(m, b) 80 | } 81 | func (m *EchoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 82 | return xxx_messageInfo_EchoResponse.Marshal(b, m, deterministic) 83 | } 84 | func (m *EchoResponse) XXX_Merge(src proto.Message) { 85 | xxx_messageInfo_EchoResponse.Merge(m, src) 86 | } 87 | func (m *EchoResponse) XXX_Size() int { 88 | return xxx_messageInfo_EchoResponse.Size(m) 89 | } 90 | func (m *EchoResponse) XXX_DiscardUnknown() { 91 | xxx_messageInfo_EchoResponse.DiscardUnknown(m) 92 | } 93 | 94 | var xxx_messageInfo_EchoResponse proto.InternalMessageInfo 95 | 96 | func (m *EchoResponse) GetResponse() string { 97 | if m != nil { 98 | return m.Response 99 | } 100 | return "" 101 | } 102 | 103 | func init() { 104 | proto.RegisterType((*EchoRequest)(nil), "EchoRequest") 105 | proto.RegisterType((*EchoResponse)(nil), "EchoResponse") 106 | } 107 | 108 | func init() { proto.RegisterFile("echo.proto", fileDescriptor_08134aea513e0001) } 109 | 110 | var fileDescriptor_08134aea513e0001 = []byte{ 111 | // 129 bytes of a gzipped FileDescriptorProto 112 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4a, 0x4d, 0xce, 0xc8, 113 | 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x57, 0x52, 0xe7, 0xe2, 0x76, 0x4d, 0xce, 0xc8, 0x0f, 0x4a, 114 | 0x2d, 0x2c, 0x4d, 0x2d, 0x2e, 0x11, 0x92, 0xe0, 0x62, 0xcf, 0x4d, 0x2d, 0x2e, 0x4e, 0x4c, 0x4f, 115 | 0x95, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x82, 0x71, 0x95, 0xb4, 0xb8, 0x78, 0x20, 0x0a, 0x8b, 116 | 0x0b, 0xf2, 0xf3, 0x8a, 0x53, 0x85, 0xa4, 0xb8, 0x38, 0x8a, 0xa0, 0x6c, 0xa8, 0x52, 0x38, 0xdf, 117 | 0xc8, 0x98, 0x8b, 0x0b, 0xa4, 0x36, 0x38, 0xb5, 0xa8, 0x2c, 0xb5, 0x48, 0x48, 0x95, 0x8b, 0x05, 118 | 0xc4, 0x13, 0xe2, 0xd1, 0x43, 0xb2, 0x49, 0x8a, 0x57, 0x0f, 0xd9, 0x38, 0x25, 0x86, 0x24, 0x36, 119 | 0xb0, 0x83, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x88, 0x1c, 0x34, 0x83, 0x9e, 0x00, 0x00, 120 | 0x00, 121 | } 122 | 123 | // Reference imports to suppress errors if they are not otherwise used. 124 | var _ context.Context 125 | var _ grpc.ClientConn 126 | 127 | // This is a compile-time assertion to ensure that this generated file 128 | // is compatible with the grpc package it is being compiled against. 129 | const _ = grpc.SupportPackageIsVersion4 130 | 131 | // EchoServerClient is the client API for EchoServer service. 132 | // 133 | // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 134 | type EchoServerClient interface { 135 | Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) 136 | } 137 | 138 | type echoServerClient struct { 139 | cc *grpc.ClientConn 140 | } 141 | 142 | func NewEchoServerClient(cc *grpc.ClientConn) EchoServerClient { 143 | return &echoServerClient{cc} 144 | } 145 | 146 | func (c *echoServerClient) Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) { 147 | out := new(EchoResponse) 148 | err := c.cc.Invoke(ctx, "/EchoServer/Echo", in, out, opts...) 149 | if err != nil { 150 | return nil, err 151 | } 152 | return out, nil 153 | } 154 | 155 | // EchoServerServer is the server API for EchoServer service. 156 | type EchoServerServer interface { 157 | Echo(context.Context, *EchoRequest) (*EchoResponse, error) 158 | } 159 | 160 | func RegisterEchoServerServer(s *grpc.Server, srv EchoServerServer) { 161 | s.RegisterService(&_EchoServer_serviceDesc, srv) 162 | } 163 | 164 | func _EchoServer_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 165 | in := new(EchoRequest) 166 | if err := dec(in); err != nil { 167 | return nil, err 168 | } 169 | if interceptor == nil { 170 | return srv.(EchoServerServer).Echo(ctx, in) 171 | } 172 | info := &grpc.UnaryServerInfo{ 173 | Server: srv, 174 | FullMethod: "/EchoServer/Echo", 175 | } 176 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { 177 | return srv.(EchoServerServer).Echo(ctx, req.(*EchoRequest)) 178 | } 179 | return interceptor(ctx, in, info, handler) 180 | } 181 | 182 | var _EchoServer_serviceDesc = grpc.ServiceDesc{ 183 | ServiceName: "EchoServer", 184 | HandlerType: (*EchoServerServer)(nil), 185 | Methods: []grpc.MethodDesc{ 186 | { 187 | MethodName: "Echo", 188 | Handler: _EchoServer_Echo_Handler, 189 | }, 190 | }, 191 | Streams: []grpc.StreamDesc{}, 192 | Metadata: "echo.proto", 193 | } 194 | -------------------------------------------------------------------------------- /005-grpc/03-client/echo/echo.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | service EchoServer { 4 | rpc Echo(EchoRequest) returns (EchoResponse) {} 5 | } 6 | 7 | message EchoRequest { 8 | string message = 1; 9 | } 10 | 11 | message EchoResponse { 12 | string response = 1; 13 | } 14 | -------------------------------------------------------------------------------- /005-grpc/03-client/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "context" 5 | "fmt" 6 | 7 | "github.com/GoesToEleven/golang-project/005-grpc/03-client/echo" 8 | "google.golang.org/grpc" 9 | ) 10 | 11 | func main() { 12 | ctx := context.Background() 13 | 14 | conn, err := grpc.Dial("localhost:8080", grpc.WithInsecure()) 15 | if err != nil { 16 | panic(err) 17 | } 18 | defer conn.Close() 19 | 20 | e := echo.NewEchoServerClient(conn) 21 | resp, err := e.Echo(ctx, &echo.EchoRequest{ 22 | Message: "Hello World!", 23 | }) 24 | if err != nil { 25 | panic(err) 26 | } 27 | 28 | fmt.Println("Got from server:", resp.Response) 29 | } 30 | -------------------------------------------------------------------------------- /005-grpc/04-chat/chat/chat.pb.go: -------------------------------------------------------------------------------- 1 | // Code generated by protoc-gen-go. DO NOT EDIT. 2 | // source: chat.proto 3 | 4 | package chat 5 | 6 | import ( 7 | context "context" 8 | fmt "fmt" 9 | proto "github.com/golang/protobuf/proto" 10 | grpc "google.golang.org/grpc" 11 | math "math" 12 | ) 13 | 14 | // Reference imports to suppress errors if they are not otherwise used. 15 | var _ = proto.Marshal 16 | var _ = fmt.Errorf 17 | var _ = math.Inf 18 | 19 | // This is a compile-time assertion to ensure that this generated file 20 | // is compatible with the proto package it is being compiled against. 21 | // A compilation error at this line likely means your copy of the 22 | // proto package needs to be updated. 23 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package 24 | 25 | type ChatMessage struct { 26 | User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` 27 | Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` 28 | XXX_NoUnkeyedLiteral struct{} `json:"-"` 29 | XXX_unrecognized []byte `json:"-"` 30 | XXX_sizecache int32 `json:"-"` 31 | } 32 | 33 | func (m *ChatMessage) Reset() { *m = ChatMessage{} } 34 | func (m *ChatMessage) String() string { return proto.CompactTextString(m) } 35 | func (*ChatMessage) ProtoMessage() {} 36 | func (*ChatMessage) Descriptor() ([]byte, []int) { 37 | return fileDescriptor_8c585a45e2093e54, []int{0} 38 | } 39 | 40 | func (m *ChatMessage) XXX_Unmarshal(b []byte) error { 41 | return xxx_messageInfo_ChatMessage.Unmarshal(m, b) 42 | } 43 | func (m *ChatMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 44 | return xxx_messageInfo_ChatMessage.Marshal(b, m, deterministic) 45 | } 46 | func (m *ChatMessage) XXX_Merge(src proto.Message) { 47 | xxx_messageInfo_ChatMessage.Merge(m, src) 48 | } 49 | func (m *ChatMessage) XXX_Size() int { 50 | return xxx_messageInfo_ChatMessage.Size(m) 51 | } 52 | func (m *ChatMessage) XXX_DiscardUnknown() { 53 | xxx_messageInfo_ChatMessage.DiscardUnknown(m) 54 | } 55 | 56 | var xxx_messageInfo_ChatMessage proto.InternalMessageInfo 57 | 58 | func (m *ChatMessage) GetUser() string { 59 | if m != nil { 60 | return m.User 61 | } 62 | return "" 63 | } 64 | 65 | func (m *ChatMessage) GetMessage() string { 66 | if m != nil { 67 | return m.Message 68 | } 69 | return "" 70 | } 71 | 72 | func init() { 73 | proto.RegisterType((*ChatMessage)(nil), "ChatMessage") 74 | } 75 | 76 | func init() { proto.RegisterFile("chat.proto", fileDescriptor_8c585a45e2093e54) } 77 | 78 | var fileDescriptor_8c585a45e2093e54 = []byte{ 79 | // 108 bytes of a gzipped FileDescriptorProto 80 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4a, 0xce, 0x48, 0x2c, 81 | 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x57, 0xb2, 0xe6, 0xe2, 0x76, 0xce, 0x48, 0x2c, 0xf1, 0x4d, 82 | 0x2d, 0x2e, 0x4e, 0x4c, 0x4f, 0x15, 0x12, 0xe2, 0x62, 0x29, 0x2d, 0x4e, 0x2d, 0x92, 0x60, 0x54, 83 | 0x60, 0xd4, 0xe0, 0x0c, 0x02, 0xb3, 0x85, 0x24, 0xb8, 0xd8, 0x73, 0x21, 0xd2, 0x12, 0x4c, 0x60, 84 | 0x61, 0x18, 0xd7, 0xc8, 0x80, 0x8b, 0x05, 0xa4, 0x59, 0x48, 0x03, 0x4a, 0xf3, 0xe8, 0x21, 0x99, 85 | 0x25, 0x85, 0xc2, 0x53, 0x62, 0xd0, 0x60, 0x34, 0x60, 0x4c, 0x62, 0x03, 0xdb, 0x6a, 0x0c, 0x08, 86 | 0x00, 0x00, 0xff, 0xff, 0xd3, 0xa1, 0x83, 0x7d, 0x83, 0x00, 0x00, 0x00, 87 | } 88 | 89 | // Reference imports to suppress errors if they are not otherwise used. 90 | var _ context.Context 91 | var _ grpc.ClientConn 92 | 93 | // This is a compile-time assertion to ensure that this generated file 94 | // is compatible with the grpc package it is being compiled against. 95 | const _ = grpc.SupportPackageIsVersion4 96 | 97 | // ChatClient is the client API for Chat service. 98 | // 99 | // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 100 | type ChatClient interface { 101 | Chat(ctx context.Context, opts ...grpc.CallOption) (Chat_ChatClient, error) 102 | } 103 | 104 | type chatClient struct { 105 | cc *grpc.ClientConn 106 | } 107 | 108 | func NewChatClient(cc *grpc.ClientConn) ChatClient { 109 | return &chatClient{cc} 110 | } 111 | 112 | func (c *chatClient) Chat(ctx context.Context, opts ...grpc.CallOption) (Chat_ChatClient, error) { 113 | stream, err := c.cc.NewStream(ctx, &_Chat_serviceDesc.Streams[0], "/Chat/Chat", opts...) 114 | if err != nil { 115 | return nil, err 116 | } 117 | x := &chatChatClient{stream} 118 | return x, nil 119 | } 120 | 121 | type Chat_ChatClient interface { 122 | Send(*ChatMessage) error 123 | Recv() (*ChatMessage, error) 124 | grpc.ClientStream 125 | } 126 | 127 | type chatChatClient struct { 128 | grpc.ClientStream 129 | } 130 | 131 | func (x *chatChatClient) Send(m *ChatMessage) error { 132 | return x.ClientStream.SendMsg(m) 133 | } 134 | 135 | func (x *chatChatClient) Recv() (*ChatMessage, error) { 136 | m := new(ChatMessage) 137 | if err := x.ClientStream.RecvMsg(m); err != nil { 138 | return nil, err 139 | } 140 | return m, nil 141 | } 142 | 143 | // ChatServer is the server API for Chat service. 144 | type ChatServer interface { 145 | Chat(Chat_ChatServer) error 146 | } 147 | 148 | func RegisterChatServer(s *grpc.Server, srv ChatServer) { 149 | s.RegisterService(&_Chat_serviceDesc, srv) 150 | } 151 | 152 | func _Chat_Chat_Handler(srv interface{}, stream grpc.ServerStream) error { 153 | return srv.(ChatServer).Chat(&chatChatServer{stream}) 154 | } 155 | 156 | type Chat_ChatServer interface { 157 | Send(*ChatMessage) error 158 | Recv() (*ChatMessage, error) 159 | grpc.ServerStream 160 | } 161 | 162 | type chatChatServer struct { 163 | grpc.ServerStream 164 | } 165 | 166 | func (x *chatChatServer) Send(m *ChatMessage) error { 167 | return x.ServerStream.SendMsg(m) 168 | } 169 | 170 | func (x *chatChatServer) Recv() (*ChatMessage, error) { 171 | m := new(ChatMessage) 172 | if err := x.ServerStream.RecvMsg(m); err != nil { 173 | return nil, err 174 | } 175 | return m, nil 176 | } 177 | 178 | var _Chat_serviceDesc = grpc.ServiceDesc{ 179 | ServiceName: "Chat", 180 | HandlerType: (*ChatServer)(nil), 181 | Methods: []grpc.MethodDesc{}, 182 | Streams: []grpc.StreamDesc{ 183 | { 184 | StreamName: "Chat", 185 | Handler: _Chat_Chat_Handler, 186 | ServerStreams: true, 187 | ClientStreams: true, 188 | }, 189 | }, 190 | Metadata: "chat.proto", 191 | } 192 | -------------------------------------------------------------------------------- /005-grpc/04-chat/chat/chat.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | service Chat { 4 | rpc Chat(stream ChatMessage) returns (stream ChatMessage) {} 5 | } 6 | 7 | message ChatMessage { 8 | string user = 1; 9 | string message = 2; 10 | } 11 | -------------------------------------------------------------------------------- /005-grpc/04-chat/client/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "context" 5 | "bufio" 6 | "fmt" 7 | "io" 8 | "os" 9 | 10 | "github.com/GoesToEleven/golang-project/005-grpc/04-chat/chat" 11 | "google.golang.org/grpc" 12 | ) 13 | 14 | func main() { 15 | if len(os.Args) != 3 { 16 | fmt.Println("Must have a url to connect to as the first argument, and a username as the second argument") 17 | return 18 | } 19 | 20 | ctx := context.Background() 21 | 22 | conn, err := grpc.Dial(os.Args[1], grpc.WithInsecure()) 23 | if err != nil { 24 | panic(err) 25 | } 26 | defer conn.Close() 27 | 28 | c := chat.NewChatClient(conn) 29 | stream, err := c.Chat(ctx) 30 | if err != nil { 31 | panic(err) 32 | } 33 | 34 | waitc := make(chan struct{}) 35 | go func() { 36 | for { 37 | msg, err := stream.Recv() 38 | if err == io.EOF { 39 | close(waitc) 40 | return 41 | } else if err != nil { 42 | panic(err) 43 | } 44 | fmt.Println(msg.User + ": " + msg.Message) 45 | } 46 | }() 47 | 48 | fmt.Println("Connection established, type \"quit\" or use ctrl+c to exit") 49 | scanner := bufio.NewScanner(os.Stdin) 50 | for scanner.Scan() { 51 | msg := scanner.Text() 52 | if msg == "quit" { 53 | err := stream.CloseSend() 54 | if err != nil { 55 | panic(err) 56 | } 57 | break 58 | } 59 | 60 | err := stream.Send(&chat.ChatMessage{ 61 | User: os.Args[2], 62 | Message: msg, 63 | }) 64 | if err != nil { 65 | panic(err) 66 | } 67 | } 68 | 69 | <-waitc 70 | } 71 | -------------------------------------------------------------------------------- /005-grpc/04-chat/server/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "io" 6 | "net" 7 | "sync" 8 | 9 | "github.com/GoesToEleven/golang-project/005-grpc/04-chat/chat" 10 | "google.golang.org/grpc" 11 | ) 12 | 13 | type Connection struct { 14 | conn chat.Chat_ChatServer 15 | send chan *chat.ChatMessage 16 | quit chan struct{} 17 | } 18 | 19 | func NewConnection(conn chat.Chat_ChatServer) *Connection { 20 | c := &Connection{ 21 | conn: conn, 22 | send: make(chan *chat.ChatMessage), 23 | quit: make(chan struct{}), 24 | } 25 | go c.start() 26 | return c 27 | } 28 | 29 | func (c *Connection) Close() error { 30 | close(c.quit) 31 | close(c.send) 32 | return nil 33 | } 34 | 35 | func (c *Connection) Send(msg *chat.ChatMessage) { 36 | defer func() { 37 | // Ignore any errors about sending on a closed channel 38 | recover() 39 | }() 40 | c.send <- msg 41 | } 42 | 43 | func (c *Connection) start() { 44 | running := true 45 | for running { 46 | select { 47 | case msg := <-c.send: 48 | c.conn.Send(msg) // Ignoring the error, they just don't get this message. 49 | case <-c.quit: 50 | running = false 51 | } 52 | } 53 | } 54 | 55 | func (c *Connection) GetMessages(broadcast chan<- *chat.ChatMessage) error { 56 | for { 57 | msg, err := c.conn.Recv() 58 | if err == io.EOF { 59 | c.Close() 60 | return nil 61 | } else if err != nil { 62 | c.Close() 63 | return err 64 | } 65 | go func(msg *chat.ChatMessage) { 66 | select { 67 | case broadcast <- msg: 68 | case <-c.quit: 69 | } 70 | }(msg) 71 | } 72 | } 73 | 74 | type ChatServer struct { 75 | broadcast chan *chat.ChatMessage 76 | quit chan struct{} 77 | connections []*Connection 78 | connLock sync.Mutex 79 | } 80 | 81 | func NewChatServer() *ChatServer { 82 | srv := &ChatServer{ 83 | broadcast: make(chan *chat.ChatMessage), 84 | quit: make(chan struct{}), 85 | } 86 | go srv.start() 87 | return srv 88 | } 89 | 90 | func (c *ChatServer) Close() error { 91 | close(c.quit) 92 | return nil 93 | } 94 | 95 | func (c *ChatServer) start() { 96 | running := true 97 | for running { 98 | select { 99 | case msg := <-c.broadcast: 100 | c.connLock.Lock() 101 | for _, v := range c.connections { 102 | go v.Send(msg) 103 | } 104 | c.connLock.Unlock() 105 | case <-c.quit: 106 | running = false 107 | } 108 | } 109 | } 110 | 111 | func (c *ChatServer) Chat(stream chat.Chat_ChatServer) error { 112 | conn := NewConnection(stream) 113 | 114 | c.connLock.Lock() 115 | c.connections = append(c.connections, conn) 116 | c.connLock.Unlock() 117 | 118 | err := conn.GetMessages(c.broadcast) 119 | 120 | c.connLock.Lock() 121 | for i, v := range c.connections { 122 | if v == conn { 123 | c.connections = append(c.connections[:i], c.connections[i+1:]...) 124 | } 125 | } 126 | c.connLock.Unlock() 127 | 128 | return err 129 | } 130 | 131 | func main() { 132 | lst, err := net.Listen("tcp", ":8080") 133 | if err != nil { 134 | panic(err) 135 | } 136 | 137 | s := grpc.NewServer() 138 | 139 | srv := NewChatServer() 140 | chat.RegisterChatServer(s, srv) 141 | 142 | fmt.Println("Now serving at port 8080") 143 | err = s.Serve(lst) 144 | if err != nil { 145 | panic(err) 146 | } 147 | } 148 | -------------------------------------------------------------------------------- /005-grpc/tools.go: -------------------------------------------------------------------------------- 1 | // +build tools 2 | 3 | package main 4 | 5 | import _ "github.com/golang/protobuf/protoc-gen-go" 6 | -------------------------------------------------------------------------------- /FanNoof-purpose.txt: -------------------------------------------------------------------------------- 1 | 101010 2 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/GoesToEleven/golang-project 2 | 3 | go 1.13 4 | 5 | require ( 6 | github.com/PuerkitoBio/goquery v1.5.0 7 | github.com/antchfx/htmlquery v1.0.0 // indirect 8 | github.com/antchfx/xmlquery v1.0.0 // indirect 9 | github.com/antchfx/xpath v1.0.0 // indirect 10 | github.com/gobwas/glob v0.2.3 // indirect 11 | github.com/gocolly/colly v1.2.0 12 | github.com/golang/protobuf v1.3.1 13 | github.com/kennygrant/sanitize v1.2.4 // indirect 14 | github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca // indirect 15 | github.com/temoto/robotstxt v1.1.1 // indirect 16 | golang.org/x/net v0.0.0-20190916140828-c8589233b77d // indirect 17 | google.golang.org/appengine v1.6.2 // indirect 18 | google.golang.org/grpc v1.23.1 19 | rsc.io/quote v1.5.2 20 | rsc.io/quote/v3 v3.1.0 21 | rsc.io/sampler v1.3.1 // indirect 22 | ) 23 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 2 | github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= 3 | github.com/PuerkitoBio/goquery v1.5.0 h1:uGvmFXOA73IKluu/F84Xd1tt/z07GYm8X49XKHP7EJk= 4 | github.com/PuerkitoBio/goquery v1.5.0/go.mod h1:qD2PgZ9lccMbQlc7eEOjaeRlFQON7xY8kdmcsrnKqMg= 5 | github.com/andybalholm/cascadia v1.0.0 h1:hOCXnnZ5A+3eVDX8pvgl4kofXv2ELss0bKcqRySc45o= 6 | github.com/andybalholm/cascadia v1.0.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y= 7 | github.com/antchfx/htmlquery v1.0.0 h1:O5IXz8fZF3B3MW+B33MZWbTHBlYmcfw0BAxgErHuaMA= 8 | github.com/antchfx/htmlquery v1.0.0/go.mod h1:MS9yksVSQXls00iXkiMqXr0J+umL/AmxXKuP28SUJM8= 9 | github.com/antchfx/xmlquery v1.0.0 h1:YuEPqexGG2opZKNc9JU3Zw6zFXwC47wNcy6/F8oKsrM= 10 | github.com/antchfx/xmlquery v1.0.0/go.mod h1:/+CnyD/DzHRnv2eRxrVbieRU/FIF6N0C+7oTtyUtCKk= 11 | github.com/antchfx/xpath v1.0.0 h1:Q5gFgh2O40VTSwMOVbFE7nFNRBu3tS21Tn0KAWeEjtk= 12 | github.com/antchfx/xpath v1.0.0/go.mod h1:Yee4kTMuNiPYJ7nSNorELQMr1J33uOpXDMByNYhvtNk= 13 | github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= 14 | github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= 15 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 16 | github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= 17 | github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= 18 | github.com/gocolly/colly v1.2.0 h1:qRz9YAn8FIH0qzgNUw+HT9UN7wm1oF9OBAilwEWpyrI= 19 | github.com/gocolly/colly v1.2.0/go.mod h1:Hof5T3ZswNVsOHYmba1u03W65HDWgpV5HifSuueE0EA= 20 | github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= 21 | github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 22 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 23 | github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg= 24 | github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 25 | github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= 26 | github.com/kennygrant/sanitize v1.2.4 h1:gN25/otpP5vAsO2djbMhF/LQX6R7+O1TB4yv8NzpJ3o= 27 | github.com/kennygrant/sanitize v1.2.4/go.mod h1:LGsjYYtgxbetdg5owWB2mpgUL6e2nfw2eObZ0u0qvak= 28 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 29 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 30 | github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca h1:NugYot0LIVPxTvN8n+Kvkn6TrbMyxQiuvKdEwFdR9vI= 31 | github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca/go.mod h1:uugorj2VCxiV1x+LzaIdVa9b4S4qGAcH6cbhh4qVxOU= 32 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 33 | github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= 34 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 35 | github.com/temoto/robotstxt v1.1.1 h1:Gh8RCs8ouX3hRSxxK7B1mO5RFByQ4CmJZDwgom++JaA= 36 | github.com/temoto/robotstxt v1.1.1/go.mod h1:+1AmkuG3IYkh1kv0d2qEB9Le88ehNO0zwOr3ujewlOo= 37 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 38 | golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 39 | golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 40 | golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 41 | golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 42 | golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 43 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 44 | golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= 45 | golang.org/x/net v0.0.0-20190916140828-c8589233b77d h1:mCMDWKhNO37A7GAhOpHPbIw1cjd0V86kX1/WA9c7FZ8= 46 | golang.org/x/net v0.0.0-20190916140828-c8589233b77d/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 47 | golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= 48 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 49 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 50 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 51 | golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 52 | golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c h1:qgOY6WgZOaTkIIMiVjBQcw93ERBE4m30iBm00nkL0i8= 53 | golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 54 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 55 | golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= 56 | golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= 57 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 58 | golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 59 | golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= 60 | golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= 61 | google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= 62 | google.golang.org/appengine v1.6.2 h1:j8RI1yW0SkI+paT6uGwMlrMI/6zwYA6/CFil8rxOzGI= 63 | google.golang.org/appengine v1.6.2/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= 64 | google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 h1:Nw54tB0rB7hY/N0NQvRW8DG4Yk3Q6T9cu9RcFQDu1tc= 65 | google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= 66 | google.golang.org/grpc v1.23.1 h1:q4XQuHFC6I28BKZpo6IYyb3mNO+l7lSOxRuYTCiDfXk= 67 | google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= 68 | honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 69 | rsc.io/quote v1.5.2 h1:w5fcysjrx7yqtD/aO+QwRjYZOKnaM9Uh2b40tElTs3Y= 70 | rsc.io/quote v1.5.2/go.mod h1:LzX7hefJvL54yjefDEDHNONDjII0t9xZLPXsUe+TKr0= 71 | rsc.io/quote/v3 v3.1.0 h1:9JKUTTIUgS6kzR9mK1YuGKv6Nl+DijDNIc0ghT58FaY= 72 | rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= 73 | rsc.io/sampler v1.3.0 h1:7uVkIFmeBqHfdjD+gZwtXXI+RODJ2Wc4O7MPEh/QiW4= 74 | rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= 75 | rsc.io/sampler v1.3.1 h1:F0c3J2nQCdk9ODsNhU3sElnvPIxM/xV1c/qZuAeZmac= 76 | rsc.io/sampler v1.3.1/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= 77 | --------------------------------------------------------------------------------