Xo is experimental. The source is now public on GitHub, or try Xo in your browser.
Menu · XO1506

Docs

XO1506: an embed names no file, too many, or too much

error · reported by the checker

An embed constant’s path is relative to the directory of the file that declares it. A Str or Bytes constant embeds exactly one file; an embed.Dir constant embeds every file a path or glob names (a directory brings its files, except names starting with . or _ unless the pattern starts with all:). One embed may hold up to 64 MiB and a program’s embeds 256 MiB together.

Example

const PAGE: Str = embed("static/*.html")

Fix

Name one file, or declare the constant `embed.Dir` to embed several.

Run xo explain XO1506 for this text in a terminal, or see section 10.6 of the specification.