The purpose of this workshop is to experiment with a simple go project and learn how to cross compile go
- Download the appropiate go binary for your operating system here
- Set up your GOPATH like this
- Create go directory,
mkdir $GOPATH
- Create the following directories underneath your GOPATH
mkdir $GOPATH/src
mkdir $GOPATH/bin
mkdir $GOPATH/pkg
- Run
go get -u github.com/yozamacs/go-workshop
to get this code - Navigate to the above path and open up in your favorite code editor and play around!
- From the project directory run
go build .
- This will create an executable in the project directory
- Run the executable with the command
./go-workshop
- You can run the executable with various options including
-image_location=<any png,jpg/jpeg,gif image link>
-filter_list=<one or more of the following: grayscale,invert,pixelate>
- Example command line opttions
./go-workshop -image_location=https://i.imgur.com/FB5IGMg.png
./go-workshop -filter_list=pixelate,invert
./go-workshop -image_location=https://i.imgur.com/5JWde5K.jpg -filter_list=pixelate
- You can run the executable with various options including
- Open a browser and visit http://localhost:8080/image to see the result!
- Try it! Add more filters, see the options here
- Try it! Add a command line option that lists possible filters for users
- Try it! Try loading the image from a file instead of a link, hint
- https://i.imgur.com/5JWde5K.jpg -> African man on phone
- https://i.imgur.com/Ed4LdEW.jpg -> question mark guy
- https://i.imgur.com/FB5IGMg.png -> why you always lying
- Creating a way for the app to take requests to make it an easy backend for a front end framework
- Using the imaging library to combine various pictures into one picture
- Find a library that does facial recognition to get more control over filters