A practical journey into the Golang Programming Language

Overview

OneTutorial - A practical journey into the Golang Programming Language

This little project will help you touch many topics around Golang, in a small and contained way.

What you will build

You can adjust the tutorial to your needs, but I find it more usefull to create something you will actually use. Therefore:

Update and read from a Google Sheet where you store your latest financial information and send out an E-Mail with a summary.

This can be adjuste to:

Update and read from a CSV file where you store your latest financial information and send out an E-Mail with a summary.

If you are not interested in the topic (finance), feel free to adjust it to whatever data inputs you consume a lot and want to automise.

Before you begin

If you want to go down the Google Sheets route, you need to:

  1. Create a "Service Account" via the Google Console.
  2. Create a key which downloads a JSON file you need for the library we are going to use.
  3. Create a new Google Sheet and share it with the Service Account E-Mail so the secret you just downloaded can read and modify the Google Sheet.

Depending on which external APIs you are going to use, you need to create API keys for them as well. For this tutorial, I am using:

  1. The coinmarketcap.com API to fetch the latest Crypto prices
  2. The eodhistoricaldata.com API to fetch ETF prices

The Tutorial

  1. Send a GET request to https://httpbin.org/ip and print the result to the console.
  2. Send out a request to CMC and fetch the price of BTC.
  3. Read the API key from an .env file.
  4. Get the name, symbol, price and 7day of the BTC and store it in a struct.
  5. Pass the list of currencies to fetch via the CLI.
  6. Save the result in a CSV file.
  7. In case the API returns an error, write it out to a log file and abort the application.
  8. In addition to the coin prices, fetch the price of a random ETF and store it also in a struct.
  9. Add a rows in your Google Sheet with ISN, amount of coins, price, total and a row with the total value of your portfolio.
  10. Instead of saving the result to a CSV, update your Google sheet.
  11. Move out your business logic in different modules.
  12. Build your Rust code and move the binary to a server and run it from there.
  13. Send out an E-Mail with the coin and ETF overview and redeploy your application/binary.
You might also like...
go programming language tutorial

go programming language tutorial Hello World Hello World fmt package Variables Short Declaration The Var Keyword Exploring Type Own Type Conversion Ty

An open source programming language that makes it easy to build simple
An open source programming language that makes it easy to build simple

The Go Programming Language Go is an open source programming language that makes it easy to build simple, reliable, and efficient software. Gopher ima

Programming language for the Orwell's Blockchain

orwells-language Programming language for the Orwell's Blockchain Keywords and notations var // Variable declaration if // Conditional decla

Q Language : A script language for Go
Q Language : A script language for Go

Q Language - A script language for Go 语言特色 与 Go 语言有最好的互操作性。可不进行任何包装即可直接使用 Go 语言的函数、类及其成员变量和方法。 有赖于 Go 语言的互操作性,这门语言直接拥有了一套非常完整且您十分熟悉的标准库,无额外学习成本。 与 Go

Programming Paradigm With Golang
Programming Paradigm With Golang

Programming-Paradigm After running python3 1_22.py you'll get a prompt: which, after entering start and the end of the interval, should create next wi

I will be uploading some basic programming in Golang so if you want to contribute please Fork this repo and contriute.
I will be uploading some basic programming in Golang so if you want to contribute please Fork this repo and contriute.

Go-language I will be uploading some basic programming in Golang so if you want to contribute please Fork this repo and contriute. This repo is for pr

Web programming tutorial with Golang

Tutorial de programação Web com Golang Para rodar o servidor Entre na pasta web_app, onde está o main.go cd caminho/para/pasta/web_app Agora execute

Tugas Alta Immersive Backend Golang Basic Programming Part 2(Input/Output, Branching, Looping)
Tugas Alta Immersive Backend Golang Basic Programming Part 2(Input/Output, Branching, Looping)

Tatacara Melakukan Setup Tugas clone project ini dengan cara git clone https://github.com/Immersive-Backend-Resource/Basic-Programming-Part2.git sete

Tugas Alta Immersive Backend Golang Basic Programming Part 4(Complexity Analysis, Array, Slice, Function)
Tugas Alta Immersive Backend Golang Basic Programming Part 4(Complexity Analysis, Array, Slice, Function)

Tatacara Melakukan Setup Tugas clone project ini dengan cara git clone https://github.com/Immersive-Backend-Resource/Basic-Programming-Part4.git sete

Owner
Rogério Araújo
I make things.
Rogério Araújo
Practical DDD in Golang

DDD на практике в Golang Russian translation of article series: "Practical DDD in Golang". Practical DDD in Golang: Value Object Practical DDD in Gola

Maksim Dzhangirov 8 Aug 26, 2022
Practical concurrency guide in Go, communication by channels, patterns

Go Concurrency Guide This guide is built on top of the some examples of the book Go Concurrency in Go and Go Programming Language Race Condition and D

Lucas Alves 1.9k Sep 23, 2022
A repository for showcasing my knowledge of the Google Go (2009) programming language, and continuing to learn the language.

Learning Google Golang (programming language) Not to be confused with the Go! programming language by Francis McCabe I don't know very much about the

Sean P. Myrick V19.1.7.2 1 Aug 26, 2022
A repository for showcasing my knowledge of the Go! (2003) programming language, and continuing to learn the language.

Learning Go! (programming language) Not to be confused with Google Golang (2009) I don't know too much about the Go! programming language, but I know

Sean P. Myrick V19.1.7.2 1 Aug 26, 2022
Crash Course about the programming language Go / Golang.

Crash Course about the programming language Go / Golang. In this course I have covered some important concepts and topics in programming.

Gabriel Dimitrievski 101 Sep 22, 2022
A complete guide to undersatnd golang programming language, web requests, JSON and creating web APIs with mongodb

Golang series A complete guide to undersatnd golang programming language, web requests, JSON and creating web APIs with mongodb LearnCodeonline.in 01

HItesh Choudhary 82 Sep 10, 2022
Learn the Go programming language (Golang) in this step-by-step tutorial course for beginners

Learn the Go programming language (Golang) in this step-by-step tutorial course for beginners. Go is an open source programming language designed at Google that makes it easy to build simple, reliable, and efficient software.

Burak Tokman 1 Dec 16, 2021
Go programming language secure coding practices guide

You can download this book in the following formats: PDF, Mobi and ePub. Introduction Go Language - Web Application Secure Coding Practices is a guide

OWASP 4.3k Oct 1, 2022
The Little Go Book is a free introduction to Google's Go programming language

The Little Go Book is a free introduction to Google's Go programming language. It's aimed at developers who might not be quite comfortable with the idea of pointers and static typing. It's longer than the other Little books, but hopefully still captures that little feeling.

Dariush Abbasi 13k Sep 27, 2022
Some examples for the programming language Go.

Golang_Examples Bubblesort: simple implementation of bubble sort algorithm in Go Level: Beginner GenericStack: a stack (LIFO collection) that can hold

Ulrich Schramme 14 Jul 28, 2022