Go typing practice
16 hand-curated Go snippets — real code, real syntax. Build muscle memory for the patterns you actually write. No signup required.
general
algorithms, utilities, and idioms- httpgetfunc fetch(url string) ([]byte, error) {
- workerfunc worker(jobs <-chan int, results chan<- int) {
- mutextype Counter struct {
- waitgroupfunc fanOut(urls []string) {
- jsondecodetype User struct {
- contextfunc doWork(ctx context.Context) error {
- errorwrapfunc readConfig(path string) (*Config, error) {
- sortslicefunc sortByAge(users []User) {
leetcode
interview-prep problems and solutions- twosumfunc twoSum(nums []int, target int) []int {
- reversefunc reverseList(head *ListNode) *ListNode {
- validparensfunc isValid(s string) bool {
- maxsubarrayfunc maxSubArray(nums []int) int {
- climbstairsfunc climbStairs(n int) int {
- binarysearchfunc search(nums []int, target int) int {
- reversestringfunc reverseString(s []byte) {
- mergelistsfunc mergeTwoLists(a, b *ListNode) *ListNode {