3

Ultimate Go: Advanced Engineering Episode 10

 1 year ago
source link: https://www.ardanlabs.com/blog/2023/01/ultimate-go-advanced-engineering-episode-10.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Subscribe to the Ardan Labs Insider

You’ll get our FREE Video Series & special offers on upcoming training events along with notifications on our latest blog posts.

Ultimate Go: Advanced Engineering Episode 10

Author image

Cheikh Seck

January 3, 2023

Introduction

In episode 9, Bill introduced the idea of the genesis record and its role in his blockchain. As a recap, the genesis record will be used to customize the settings of his blockchain. The approach Bill takes here is similar to how Ethereum operates because he is storing the record in JSON format.

In this video, Bill starts by defining the Go types his blockchain will use. The first type he defines will represent the genesis record. This type will be populated by the data found in the genesis record and will ensure Bill reaps all the benefits of using strongly typed language. Before he proceeds with the next type definition, he highlights the possible limitations he can encounter by using type uint64. Watch to learn how to write idiomatic and durable Go code that will load your blockchain’s settings from disk.

Things you will learn in this video

  • Map JSON data for a Go struct.
  • Load a JSON from disk onto a Go struct.
  • Determine the right built-in type to use for a struct field.

Video

Go Training

We have taught Go to thousands of developers all around the world since 2014. There is no other company that has been doing it longer and our material has proven to help jump start developers 6 to 12 months ahead of their knowledge of Go. We know what knowledge developers need in order to be productive and efficient when writing software in Go.

Our classes are perfect for both experienced and beginning engineers. We start every class from the beginning and get very detailed about the internals, mechanics, specification, guidelines, best practices and design philosophies. We cover a lot about "if performance matters" with a focus on mechanical sympathy, data oriented design, decoupling and writing production software.

Capital One
Cisco
Visa
Teradata
Red Ventures

Interested in Ultimate Go Corporate Training and special pricing?

Let’s Talk Corporate Training!

Join Our Online
Education Program

Our courses have been designed from training over 30,000 engineers since 2013, and they go beyond just being a language course. Our goal is to challenge every student to think about what they are doing and why.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK