The document provides an overview of the topics covered in a Golang training track, including version control with Git, the basics of the Go programming language, data structures, functions, pointers, interfaces, structs, file handling, web development, concurrency, GraphQL, microservices, gRPC, testing, and optimization. Key concepts and commands are explained for setting up Go projects, writing and running Go code, building web servers, handling concurrency, and integrating with databases. The track aims to teach attendees core Go skills and popular tools/techniques for developing applications and APIs.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
77 views5 pages
GOLang
The document provides an overview of the topics covered in a Golang training track, including version control with Git, the basics of the Go programming language, data structures, functions, pointers, interfaces, structs, file handling, web development, concurrency, GraphQL, microservices, gRPC, testing, and optimization. Key concepts and commands are explained for setting up Go projects, writing and running Go code, building web servers, handling concurrency, and integrating with databases. The track aims to teach attendees core Go skills and popular tools/techniques for developing applications and APIs.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5
GOLang Training Track
Introduction to Version Control and Git:
• Understand the concepts of version control and why it's essential. • Learn about Git's role in version control. Installation and Configuration: • Install Git on your local machine. • Configure your identify (name and email) using git config. Basic Git Commands: • git init: Initialize a new Git repository. • git clone: Clone a remote repository to your local machine. • git add: Stage changes for commit. • git commit: Commit staged changes with a message. • git status: Check the status of your working directory. • git log: View commit history. • git diff: View changes between commits or the working directory. Branching and Merging: • git branch: Create, list, and delete branches. • git checkout: Switch between branches. • git merge: Merge changes from one branch into another. • Resolve merge conflicts. Remote Repositories: • Connect your local repository to a remote (e.g., GitHub, GitLab, Bitbucket). • git remote: Manage remote repositories. • git push: Send your local changes to a remote repository. • git pull: Fetch changes from a remote repository and merge them.
Getting Started with Go
• Introduction to Golang • Background, History, Static Typing in Golang. • Installing Golang, GOPATH • Go modules. • Installing the VS Code editor, Golang setup • A simple hello world program • Building, Running a Go Program • Basic data types, variables declaration • GoDoc usage
Exploring Control Structures and Arrays in Go
• Numerical and Boolean operations • For and if loops, switch cases in Golang • Golang Arrays, Declaring and Initializing an array • Looping through an array • Slicing an array, Copying to an array • Appending elements to an array • Mastering Maps in Go • Introduction to maps • Creating a map, adding members to the map • loop over the map, internal workings of map • Length of a map, adding new key/value pair • Deleting a key in the map Function Fundamentals and Advanced Techniques in Go • Introduction to functions • Creating simple functions, function signatures and syntax • Passing parameters/arguments to functions • Returning single, multiple values from functions, naked return • Variable number of arguments to functions • Functions as expressions in Golang • Inline functions in Golang • Wring recursive functions in Golang • Deferring statements in a function • Panic and Recover methods in Golang. • Error handling & Custom error types. • variable scope, closure, anonymous function, exported & un-exported members, passing function as a parameter.
Understanding Pointers and Memory Management in Go
• Introduction to Pointers • Pass by value and pass by pointers. • Getting the address of a variable • Passing the address of the variable • Dereferencing the pointer • Dynamic memory allocation using new function. • How to use make function. • Learn about garbage collection, memory allocation, and optimizing memory use.
Exploring Structs and Interfaces in Go
• Introduction to Structs • Creating, declaring a struct and struct members • Initializing a structure with initial values • Assigning methods to structs Advanced Go: Interfaces, Polymorphism, and Built-In Packages • Introduction to interface types • Creating an interface & implementing interface. • Type assertion • Empty interface • Type switch • OOP concepts – abstraction, encapsulation, inheritance/composition, polymorphism with examples • Using go’s built-in packages (os, log, io) File Handling, and Type Conversions in Go • Creating/opening a file • Reading from a file, Writing to a file , Closing a file • Type conversions • Converting int to float and vice-versa • Strconv - string conversion functions ParseInt, ParseFloat
Building Web Servers and Handlers in Go with HTTP
• Introduction to http programming in Golang • Using net/http package • Creating a web server • Working with routers, Handle Funcs & Middleware. • Having multiple routes and handlers • Using context package – (share request scope values, pass cancellation signals) • Web Development with Go: Handling Requests, Data Models, and JSON • Returning strings, json from the http methods • Defining data models using structs • Encoding/decoding structs to Json using Json Encoder/Decoder • Serving static files • Parsing request and URL parameters- (headers, form data, query params, request path params)
Mastering Go Concurrency: Go routines and Channels
• Introduction to Go concurrency. • Converting sequential flow to concurrent flow • Using Go routines • Introduction to channels – (types of channels, buffered channel, un-buffered channels, read only channels, send only channels, bi-directional channels) • Creating a channel using make function. • Passing/Receiving information through channels • Loop over channel (For range, for select-listening on multiple channels)
Advanced Concurrency and Synchronization Techniques in Go
• Channel Synchronization through sync package • Using waitGroup from sync package • Using mutexes for synchronization • Concurrency patterns and their usage eg, fan-in, fan-out, worker pool. • What is race condition & how to detect it using race flag • Deadlocks • Sync.Map • Making concurrent http requests to 3rd party apis • Synchronizing the concurrent http requests Introduction to GraphQL • Understand the basics of GraphQL and how it differs from traditional REST APIs. • Learn about the advantages of using GraphQL for building APIs. Setup and Installation • Install gqlgen using the provided Installation instructions. • Create a new project directory for your GraphQL server. Defining Your Schema • Learn how to define your GraphQL schema using the GraphQL Schema Definition Language (SDL). • Define types, queries, mutations, and input types for your API. gqlgen Configuration • Explain the Configuration options. • Show how to create a gqlgen.yml file. Generating Resolver Code • Demonstrate the gqlgen generate command. • Explore the generated code and resolvers. Implementing Resolvers • Cover how to write resolver functions. • Connect resolvers to data sources. • Allow participants to work on implementing their resolvers. Authentication and Authorization • Comprehensive coverage of encryption, decryption, and various hashing techniques in Golang, including Sha256 and md5. • Discuss Authentication and authorization techniques. (JWT | OAuth) • Provide examples. Data Sources and Databases • Explain how to connect GraphQL to databases. • Discuss library choices (e.g., sqlx or GORM). • Walk through fetching and manipulating data. Testing GraphQL Resolvers • Introduce Testing techniques. • Guide participants in wring tests for their resolvers.
Error Handling and Validation
• Cover error handling strategies. • Demonstrate how to validate user input.
Building Microservices with Go
• Implementing REST APIs using gin. • Implementing logging in Microservice using zerolog. • Working with middlewares - Authentication & logging Middleware examples. • Exploring the capabilities of go-validator for input Validation and data integrity checks. • Performing CRUD Operations using GORM Package for PostgreSQL • SQL (DB table associations – one-to-one, one-to-many, many-to-many, belongs-to) • Handling database transactions GRPC - Protocol Buffers Integration in Go Microservices • The basics of gRPC, including service definitions, client-server communication, and code generation. • Defining messages and services using protobuf. • Implementing grpc client & server. • Implementing grpc unary & streaming APIs
Understanding Application in Golang:
• A thorough exploration of SOLID principles and how to implement them effectively using Golang. Unit testing: • Writing table drive unit test cases. • Using Dependency Injection for mocking. • Using gomock for mocking
Benchmarking & Profiling:
• Discover how to identify bottlenecks, memory issues, and optimize your code using Go's tools.