include

package
v0.0.0-...-af76324 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2024 License: MIT Imports: 7 Imported by: 4

Documentation

Overview

Copyright (C) 2024 early (LGPL)

Copyright (C) 2024 early (LGPL)

Index

Constants

This section is empty.

Variables

View Source
var ErrNoEligibleCaller = errors.New("no eligible caller on the stack")
View Source
var ErrNoRuntimeAccess = errors.New("couldn't access the runtime")

Functions

func SetNotEligible

func SetNotEligible(pkg string)

SetNotEligible marks a package as ineligible for including files. You should use the arguments of include to to this if you can, but if you are using a package that passes through to include, you can call this in an init function.

Types

type FileOpener

type FileOpener interface {
	Opener
	FileName() string
}

func File

func File(filename string, ignorePackages ...string) FileOpener

File returns an Opener that Opens() a file. If filename is a relative path, it is considered relative to the *calling file*, not the working directory. If ignorePackages is nonempty, callers in any package specified are ignored.

type Opener

type Opener interface {
	Open() (io.ReadCloser, error)
}

type OpenerFunc

type OpenerFunc func() (io.ReadCloser, error)

func (OpenerFunc) Open

func (opener OpenerFunc) Open() (io.ReadCloser, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL