Dreams of Code Logo
Command Line Applications in Go
Introduction
7 lessons
Introduction to the course
02:58
Welcome!
04:56
Setting up your environment
15:27
Go 101: Variables, Values & Types
24:33
Go 101: Conditionals & Loops
19:26
Go 101: Functions & Pointers
17:09
Go 101: Packages
12:44
Counting Words
7 lessons
Starting a new project
12:41
Reading from a file
11:23
A Simple Word Counter
09:30
Writing tests
15:34
Edge cases
10:35
Table Driven Testing
13:11
A better algorithm
15:23
Input, Output, & Arguments
13 lessons
Introduction to input
02:19
Exit codes
05:39
Standard error
11:10
Reading large files
23:27
Bytes & ascii
15:12
Unicode & Runes
The bufio package
Decoupling & io.Reader
Command line arguments
Handling multiple errors
Closing files with defer
Standard input
Scanning data
Adding Features
15 lessons
Adding new features
Counting lines
Counting bytes
Encapsulation
File offsets and seeking
Methods
Variadic parameters
Method receivers
CLI flags
Single pass algorithm
Tabular output
Organizing our code
Package visibility
Constructor arguments
Whitebox vs Blackbox testing
Concurrency & Streams
7 lessons
Introduction to concurrency & data
Goroutines & Waitgroups
Channels
Handling async errors
io.TeeReader
io.Pipe
io.MultiWriter
Advanced Testing
8 lessons
Introduction to Advanced Testing
Benchmark testing
End to end testing (e2e)
e2e: Testing files
e2e: Multiple files
Determinstic output
e2e: Testing flags
Creating test helpers
Commands, Signals, & Contexts
11 lessons
Executing commands
Passing in input
Configuring commands
Asynchronous execution
Signals
Graceful shutdown
Cancellation
context.Context
Building a process guard
Opening an editor
Fuzzing finding with fzf
Filesystem & Networking
14 lessons
Introduction to Networking & Files
File flags
File permissions
Walking the filesystem
Lockfiles & PIDFiles
File locks
The net package
TCP Client
DNS lookups
Port scanning
The net/http package
Marshaling & unmarshaling data
Sending files with HTTP
Testing HTTP Requests
Powerful Command Line Applications
22 lessons
Introduction to Powerful CLI Apps
Subcommands
Flagsets
Subcommand Abstraction
Compressing files & data with GZip
Hashing files & data
Password & Secure Input
Have I been pwned?
Environment variables
Configuration files
Advanced Error Handling
Embedding Files
Cross platform code
Build flags
Regular expressions
UI: A Loading Spinner
UI: A Progress Bar
Adding color to Stdout
Working with images
Distributing an application
An Application Builder
Handling CGO
Popular CLI Packages
12 lessons
Introduction to Popular CLI packages
Subcommands with Cobra
POSIX flags with pFlag
Storing data with SQLite
Database Migrations with Migrate
Repositories with SQLc
Color with color
TUI with Bubble Tea
Forms with huh
Test assertions with Testify
Mocking with go-mock
Releasing with Go releaser
Final Project
Coming Soon
Introduction to Final Project
Coming Soon
Installing Ollama
Coming Soon
Obtaining staged changes
Coming Soon
Handling errors
Coming Soon
Performing HTTP Requests
Coming Soon
Adding in retry
Coming Soon
Interfaces
Coming Soon
Adding another provider
Coming Soon
Commiting our messages
Coming Soon
Introduction
7 lessons
Introduction to the course
02:58
Welcome!
04:56
Setting up your environment
15:27
Go 101: Variables, Values & Types
24:33
Go 101: Conditionals & Loops
19:26
Go 101: Functions & Pointers
17:09
Go 101: Packages
12:44
Counting Words
7 lessons
Starting a new project
12:41
Reading from a file
11:23
A Simple Word Counter
09:30
Writing tests
15:34
Edge cases
10:35
Table Driven Testing
13:11
A better algorithm
15:23
Input, Output, & Arguments
13 lessons
Introduction to input
02:19
Exit codes
05:39
Standard error
11:10
Reading large files
23:27
Bytes & ascii
15:12
Unicode & Runes
The bufio package
Decoupling & io.Reader
Command line arguments
Handling multiple errors
Closing files with defer
Standard input
Scanning data
Adding Features
15 lessons
Adding new features
Counting lines
Counting bytes
Encapsulation
File offsets and seeking
Methods
Variadic parameters
Method receivers
CLI flags
Single pass algorithm
Tabular output
Organizing our code
Package visibility
Constructor arguments
Whitebox vs Blackbox testing
Concurrency & Streams
7 lessons
Introduction to concurrency & data
Goroutines & Waitgroups
Channels
Handling async errors
io.TeeReader
io.Pipe
io.MultiWriter
Advanced Testing
8 lessons
Introduction to Advanced Testing
Benchmark testing
End to end testing (e2e)
e2e: Testing files
e2e: Multiple files
Determinstic output
e2e: Testing flags
Creating test helpers
Commands, Signals, & Contexts
11 lessons
Executing commands
Passing in input
Configuring commands
Asynchronous execution
Signals
Graceful shutdown
Cancellation
context.Context
Building a process guard
Opening an editor
Fuzzing finding with fzf
Filesystem & Networking
14 lessons
Introduction to Networking & Files
File flags
File permissions
Walking the filesystem
Lockfiles & PIDFiles
File locks
The net package
TCP Client
DNS lookups
Port scanning
The net/http package
Marshaling & unmarshaling data
Sending files with HTTP
Testing HTTP Requests
Powerful Command Line Applications
22 lessons
Introduction to Powerful CLI Apps
Subcommands
Flagsets
Subcommand Abstraction
Compressing files & data with GZip
Hashing files & data
Password & Secure Input
Have I been pwned?
Environment variables
Configuration files
Advanced Error Handling
Embedding Files
Cross platform code
Build flags
Regular expressions
UI: A Loading Spinner
UI: A Progress Bar
Adding color to Stdout
Working with images
Distributing an application
An Application Builder
Handling CGO
Popular CLI Packages
12 lessons
Introduction to Popular CLI packages
Subcommands with Cobra
POSIX flags with pFlag
Storing data with SQLite
Database Migrations with Migrate
Repositories with SQLc
Color with color
TUI with Bubble Tea
Forms with huh
Test assertions with Testify
Mocking with go-mock
Releasing with Go releaser
Final Project
Coming Soon
Introduction to Final Project
Coming Soon
Installing Ollama
Coming Soon
Obtaining staged changes
Coming Soon
Handling errors
Coming Soon
Performing HTTP Requests
Coming Soon
Adding in retry
Coming Soon
Interfaces
Coming Soon
Adding another provider
Coming Soon
Commiting our messages
Coming Soon
/
/
  1. Command Line Applications in Go
  2. Powerful Command Line Applications
  3. UI: A Loading Spinner
Dreams of Code Logo
Video thumbnail
Locked video

Please purchase the course to watch this video.

Powerful Command Line Applications
UI: A Loading Spinner

Full Course

$299$199
USD
EARLY BIRD OFFER!
Creating visual feedback in command-line interface (CLI) applications is essential for keeping users informed during long-running tasks, such as data fetching or heavy computations. One effective method to achieve this is by implementing a loading spinner, which serves as an animated progress indicator. The lesson outlines a straightforward approach to build a spinner in Go by defining a function that utilizes character sequences to simulate rotation. Key steps include establishing a loop to print these characters while managing control characters to overwrite the output line for seamless animation. To enhance user experience, the spinner runs concurrently with the task it indicates, employing Go routines and channels to allow for real-time updates. The lesson emphasizes potential improvements, such as creating a dedicated spinner type with configurable properties, thus enabling reusable components and further refining the user interface in future projects.