nix-amer/internal/buildfile/errors.go

19 lines
324 B
Go

package buildfile
import (
"errors"
"fmt"
)
var ErrInvalidSyntax = errors.New("invalid instruction format")
var ErrUnknownInstruction = errors.New("unknown instruction")
type LineError struct {
Line int
Err error
}
func (le LineError) Error() string {
return fmt.Sprintf("line %d | %s", le.Line, le.Err.Error())
}