Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects, and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
houjunchen
go-by-example
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
More
items
go-by-example
Public
Notifications
You must be signed in to change notification settings
Fork
0
(
0
)
Star
2
(
2
)
You must be signed in to star a repository
About
My golang practices
Topics
golang
Resources
Readme
Activity
Stars
2
stars
Watchers
1
watching
Forks
0
forks
Report repository
master
Branches
Tags
Go to file
Code
Open more actions menu
Latest commit
History
77 Commits
77 Commits
Folders and files
Name
Name
Last commit message
Last commit date
01-hello-world
01-hello-world
02-values
02-values
03-variables
03-variables
04-constants
04-constants
05-for
05-for
06-if-else
06-if-else
07-switch
07-switch
08-arrays
08-arrays
09-slices
09-slices
10-maps
10-maps
11-range
11-range
12-functions
12-functions
13-multiple-return-values
13-multiple-return-values
14-variadic-functions
14-variadic-functions
15-closures
15-closures
16-recursion
16-recursion
17-pointers
17-pointers
18-structs
18-structs
19-methods
19-methods
20-interfaces
20-interfaces
21-errors
21-errors
22-goroutines
22-goroutines
23-channels
23-channels
24-channel-buffering
24-channel-buffering
25-channel-synchronization
25-channel-synchronization
26-channel-directions
26-channel-directions
27-select
27-select
28-timeouts
28-timeouts
29-non-blocking-channel-operations
29-non-blocking-channel-operations
30-closing-channels
30-closing-channels
31-range-over-channels
31-range-over-channels
32-timers
32-timers
33-tickers
33-tickers
34-worker-pools
34-worker-pools
35-rate-limiting
35-rate-limiting
36-atomic-counters
36-atomic-counters
37-mutexes
37-mutexes
38-stateful-goroutines
38-stateful-goroutines
39-sorting
39-sorting
40-sorting-by-functions
40-sorting-by-functions
41-panic
41-panic
42-defer
42-defer
43-collection-functions
43-collection-functions
44-string-functions
44-string-functions
45-strign-formatting
45-strign-formatting
46-regular-expressions
46-regular-expressions
47-json
47-json
48-Time
48-Time
49-Epoch
49-Epoch
50-time-formatting-parsing
50-time-formatting-parsing
51-random-numbers
51-random-numbers
52-number-parsing
52-number-parsing
53-url-parsing
53-url-parsing
54-sha1-hashes
54-sha1-hashes
55-base64-encoding
55-base64-encoding
56-reading-files
56-reading-files
57-writing-files
57-writing-files
58-line-filters
58-line-filters
59-command-line-arguments
59-command-line-arguments
60-command-line-flags
60-command-line-flags
61-environment-variables
61-environment-variables
62-spawning-processes
62-spawning-processes
63-execing-processes
63-execing-processes
64-signals
64-signals
65-exit
65-exit
big
big
bufio
bufio
context
context
factory-pattern
factory-pattern
reflect
reflect
slice-tricks
slice-tricks
README.md
README.md
View all files
Repository files navigation
README
More
items
Golang examples from
https://gobyexample.com/
and somewhere else.
About
My golang practices
Topics
golang
Resources
Readme
Activity
Stars
2
stars
Watchers
1
watching
Forks
0
forks
Report repository
Releases
Packages
Contributors
Languages
You can’t perform that action at this time.