package sample

import (
    "context"
    "fmt"
    "reflect"
    "time"
)

func Run(ctx context.Context, db Queryer, items []string, mu MutexLike) {
    go func() {
        for {
            _ = ctx
        }
    }()

    for _, item := range items {
        mu.Lock()
        time.Sleep(time.Millisecond)
        _, _ = db.QueryContext(ctx, "SELECT * FROM widgets WHERE name LIKE '%foo%'")
        _ = fmt.Sprintf("%s", item)
        _ = reflect.TypeOf(item)
        _ = make([]byte, 16)
        mu.Unlock()
    }
}

type Queryer interface {
    QueryContext(context.Context, string) (any, error)
}

type MutexLike interface {
    Lock()
    Unlock()
}