source

package
v0.9.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package source contains utility functions that standardize reading source bytes across cue packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open added in v0.9.0

func Open(filename string, src any) (io.ReadCloser, error)

Open creates a source reader for the given arguments. If src != nil, Open converts src to an io.Open if possible; otherwise it returns an error. If src == nil, Open returns the result of opening the file specified by filename.

func ReadAll added in v0.9.0

func ReadAll(filename string, src any) ([]byte, error)

ReadAll loads the source bytes for the given arguments. If src != nil, ReadAll converts src to a []byte if possible; otherwise it returns an error. If src == nil, ReadAll returns the result of reading the file specified by filename.

Types

This section is empty.

Jump to

Keyboard shortcuts

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