Skip to content

Instantly share code, notes, and snippets.

View pedrobertao's full-sized avatar
🚀

Pedro Bertao pedrobertao

🚀
  • Brazil
View GitHub Profile
@pedrobertao
pedrobertao / promieall.go
Created July 17, 2025 15:54
promise_all_in_go.go
package main
import (
"fmt"
"io"
"net/http"
)
// Result holds the result of a work function execution
type Result struct {
@pedrobertao
pedrobertao / routineswithtimeout.go
Created July 23, 2025 11:36
Go routines + context.timeout
package main
import (
"context"
"fmt"
"os"
"time"
)
func main() {
@pedrobertao
pedrobertao / inter_seq.go
Created July 25, 2025 17:42
Example native iterateble
// Package main demonstrates Go iterator patterns using the iter package.
// This program showcases both built-in iterators from maps/slices packages
// and custom iterator implementation.
package main
import (
"fmt" // for formatted output
"iter" // for iterator types (Go 1.23+)
"maps" // for map iterator utilities
"slices" // for slice iterator utilities