GX8004: code file or line range is missing
gx.CodeFile names a file that does not exist, or a line range that is longer than the file.
Cause
gx.CodeFile names a file that does not exist, or a line range that is longer than the file.
Example
package code
props {
Code gx.Code
}
<pre>{p.Code.Source}</pre>package code
<Code code={gx.CodeFile("content/sample.go", "1-3")} />gx check reports:
ui/code/Page.gx:3:13: GX8004: gx.CodeFile cannot read content/sample.goFix
- Correct the path. The path starts at the module root.
- Correct the line range.