Documentation ¶
Overview ¶
Utilities for working with config files that rely on cue for validation and definition.
Index ¶
- Constants
- func FileHash(path string) (string, error)
- func Hash(s any) (string, error)
- func InitFile(path string, valuePtr any) (bool, error)
- func IsSupportedExtension(ext string) bool
- func Marshal(valuePtr any, extension string) ([]byte, error)
- func MarshalJSON(v interface{}) ([]byte, error)
- func ParseFile(path string, valuePtr any) error
- func ParseFileWithExtension(path, ext string, valuePtr any) error
- func Unmarshal(data []byte, extension string, valuePtr any) error
- func WriteFile(path string, value any) error
Constants ¶
View Source
const Indent = " "
Variables ¶
This section is empty.
Functions ¶
func IsSupportedExtension ¶
func MarshalJSON ¶
MarshalJSON marshals the given value to JSON. It does not HTML escape and adds standard indentation.
TODO: consider using cue's JSON marshaller instead of "encoding/json" ... it might have extra functionality related to the cue language.
func ParseFileWithExtension ¶
ParseFileWithExtension lets the caller override the extension of the `path` filename For example, project.csproj files should be treated as having extension .xml
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.