Documentation
¶
Overview ¶
Package hostcap reports what the host a build runs on can do beyond the language itself, so a capability that is not there is named rather than failing obscurely.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrSpawnUnsupported = errors.New("a WebAssembly build cannot start external processes")
ErrSpawnUnsupported is the cause every external-process operation reports on a host that can start no process: every Go WebAssembly target (GOOS=js and GOOS=wasip1, both GOARCH=wasm). Callers reach it through errors.Is, wrapped into whichever typed error their layer answers with.
Functions ¶
func CheckSpawn ¶
CheckSpawn returns nil: every native host starts processes, so nothing is refused here and every caller goes on to look the tool up and run it as it always has.
Types ¶
type UnsupportedError ¶
type UnsupportedError struct {
// Subject is what was to run: a solver, an engine's executable, a compiler.
Subject string
}
UnsupportedError names what cannot run on this host.
func (*UnsupportedError) Error ¶
func (e *UnsupportedError) Error() string
Error names the subject and the cause it cannot run for.
func (*UnsupportedError) Unwrap ¶
func (e *UnsupportedError) Unwrap() error
Unwrap returns ErrSpawnUnsupported.