2018-10-22 21:11:10 +03:00
1. **Print your name and your best friend's name** using Println twice. [Check out this exercise here ](https://github.com/inancgumus/learngo/tree/master/02-write-your-first-program/exercises/01-print-names ).
2018-10-22 19:31:34 +03:00
2021-03-23 16:59:08 +03:00
2. **Say hello to yourself.**
2018-10-22 19:31:34 +03:00
1. Build your program using `go build`
2018-11-18 05:03:43 +08:00
2018-10-22 19:31:34 +03:00
2. **Send it to your friend**
S/he should use be using the same operating system.
For example, if you're using Windows, then hers/his should be Windows as well.
3. **Send your program to a friend with a different operating system**
So, you should compile your program for her operating system.
2018-11-04 11:33:10 +03:00
**Create an OSX executable:**
2018-10-22 19:31:34 +03:00
`GOOS=darwin GOARCH=386 go build`
2018-11-04 11:33:10 +03:00
**Create a Windows executable:**
2018-10-22 19:31:34 +03:00
`GOOS=windows GOARCH=386 go build`
2018-11-04 11:33:10 +03:00
**Create a Linux executable:**
2018-10-22 19:31:34 +03:00
`GOOS=linux GOARCH=arm GOARM=7 go build`
**You can find the full list in here:**
https://golang.org/doc/install/source#environment
2018-11-04 11:33:10 +03:00
2018-11-18 05:03:43 +08:00
**NOTE:** If you're using the command prompt or the PowerShell, you may need to use it like this:
2018-11-04 11:33:10 +03:00
`cmd /c "set GOOS=darwin GOARCH=386 && go build"`
2018-11-18 05:03:43 +08:00
2021-03-23 16:59:08 +03:00
3. **Call [Print](https://golang.org/pkg/fmt/#Print) instead of [Println](https://golang.org/pkg/fmt/#Println)** to see what happens.
2018-10-22 19:31:34 +03:00
2021-03-23 16:59:08 +03:00
4. **Call [Println](https://golang.org/pkg/fmt/#Println) or [Print](https://golang.org/pkg/fmt/#Print) with multiple values** by separating them using commas.
2018-10-22 19:31:34 +03:00
2021-03-23 16:59:08 +03:00
5. **Remove the double quotes from a string literal** and see what happens.
2018-10-22 19:31:34 +03:00
2021-03-23 16:59:08 +03:00
6. **Move the package and import statement** to the bottom of the file and see what happens.
2018-10-22 19:31:34 +03:00
2021-03-23 16:59:08 +03:00
7. ** [Read Go online documentation ](https://golang.org/pkg )**.
2018-10-22 19:31:34 +03:00
1. Take a quick look at the packages and read what they do.
2. Look at their source-code by clicking on their titles.
2018-11-18 05:03:43 +08:00
3. You don't have to understand everything, just do it. This will warm you up for the upcoming lectures.
2018-10-22 19:31:34 +03:00
2021-03-23 16:59:08 +03:00
8. Also, **take a tour on** : https://tour.golang.org/
2018-10-22 19:31:34 +03:00
1. Have a quick look. Check out the language features.
2018-11-18 05:03:43 +08:00
2. We're going to talk all about them soon.
2021-03-23 16:59:08 +03:00
9. [Follow me on twitter to learn more ](https://twitter.com/inancgumus ).