func NewDummySource(code string) *Source {
	return &Source{"<dummy>", []byte(code), false}
}
NewDummySource make *Source with passed code. The source is actually does not exist in filesystem (so dummy). This is used for tests.
package locerr
import (
	"io/ioutil"
	"os"
	"path/filepath"
	"strings"
)
type Source struct {
	Path string
	Code []byte
	Exists bool
}
func NewSourceFromFile(file string) (*Source, error) {
	path, err := filepath.Abs(file)
	if err != nil {
		return nil, err
	}
	b, err := ioutil.ReadFile(path)
	if err != nil {
		return nil, err
	}
	return &Source{path, b, true}, nil
}
func NewSourceFromStdin() (*Source, error) {
	b, err := ioutil.ReadAll(os.Stdin)
	if err != nil {
		return nil, err
	}
	return &Source{"<stdin>", b, false}, nil
}