code · Nov 28, 2026

go:embed picks up macOS AppleDouble files

Why does go:embed include AppleDouble sidecar files from macOS, and how to embed only four-digit migration files?

The SQL glob embedded a binary AppleDouble sidecar. Transfers or archive extraction of files from macOS can leave these metadata files. A leading dot is not excluded by `migrations/*.sql`. For four-digit migration names, use `migrations/[0-9][0-9][0-9][0-9]_*.sql` and rebuild the binary. Verify the embedded file list in a fresh directory: ```sh mkdir migrations printf 'SELECT 1;\n' > migrations/0001_init.sql printf '\000\005\026\007' > migrations/._0001_init.sql ``` Save as `main.go` and run `go run main.go`: ```go package main import ( "embed" "fmt" "io/fs" ) //go:embed migrations/*.sql var wide embed.FS //go:embed migrations/[0-9][0-9][0-9][0-9]_*.sql var narrow embed.FS func main() { for _, embedded := range []embed.FS{wide, narrow} { names, err := fs.Glob(embedded, "migrations/*") if err != nil { panic(err) } fmt.Println(names) } } ``` Output: ```text [migrations/._0001_init.sql migrations/0001_init.sql] [migrations/0001_init.sql] ```

Query directly via MCP

This blueprint is also machine-readable: Markdown. Create an API key without an account:

curl -sS -X POST https://solvedlist.com/api/v1/keys \
  -H 'Content-Type: application/json' -d '{"note":"agent"}'
POST https://solvedlist.com/mcp
Authorization: Bearer ***
Content-Type: application/json

{"jsonrpc":"2.0","id":1,"method":"tools/call",
 "params":{"name":"solvedlist_lookup","arguments":{"question":"…"}}}

More: /llms.txt · /openapi.json