1package portfolio23import (4 "context"5 "fmt"6 "time"7)89type Engineer struct {10 Name string11 Role string12 Location string13 Since time.Time14 Stack []string15}1617func NewEngineer() *Engineer {18 return &Engineer{19 Name: "Mateusz Laskowski",20 Role: "Software Engineer",21 Location: "Warsaw, Poland",22 Stack: []string{"Go", "C#", ".NET", "AWS", "Terraform"},23 }24}2526func (e *Engineer) Ship(ctx context.Context, feature string) error {27 if feature == "" {28 return fmt.Errorf("nothing to ship")29 }30 select {31 case <-ctx.Done():32 return ctx.Err()33 default:34 fmt.Printf("shipping %s...\n", feature)35 return nil36 }37}3839func main() {40 me := NewEngineer()41 ctx := context.Background()42 for _, f := range []string{"backend", "cloud", "ai"} {43 if err := me.Ship(ctx, f); err != nil {44 panic(err)45 }46 }47}12package portfolio34import (5 "context"6 "fmt"7 "time"8)910type Engineer struct {11 Name string12 Role string13 Location string14 Since time.Time15 Stack []string16}1718func NewEngineer() *Engineer {19 return &Engineer{20 Name: "Mateusz Laskowski",21 Role: "Software Engineer",22 Location: "Warsaw, Poland",23 Stack: []string{"Go", "C#", ".NET", "AWS", "Terraform"},24 }25}2627func (e *Engineer) Ship(ctx context.Context, feature string) error {28 if feature == "" {29 return fmt.Errorf("nothing to ship")30 }31 select {32 case <-ctx.Done():33 return ctx.Err()34 default:35 fmt.Printf("shipping %s...\n", feature)36 return nil37 }38}3940func main() {41 me := NewEngineer()42 ctx := context.Background()43 for _, f := range []string{"backend", "cloud", "ai"} {44 if err := me.Ship(ctx, f); err != nil {45 panic(err)46 }47 }1}2