Back to

Package source

Latest Go to latest

The latest major version is .

Published: Jul 18, 2020 | License: Apache-2.0 | Module:


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


func Read

func Read(filename string, src interface{}) ([]byte, error)

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

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier