Help us shape the future of Go! Take the 2026 Go Developer Survey

codec

package
v0.1.58 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeData

func DecodeData(location string, data []byte, out interface{}) error

DecodeData decodes YAML or JSON bytes into out based on the supplied path. Non-JSON extensions default to YAML.

func DecodeFile

func DecodeFile(filename string, out interface{}) error

DecodeFile reads a local YAML/JSON resource file and decodes it into out.

func DecodeURL

func DecodeURL(ctx context.Context, fs afs.Service, url string, out interface{}, options ...storage.Option) error

DecodeURL reads a filesystem-backed YAML/JSON resource and decodes it into out.

func MarshalMarkdown added in v0.1.57

func MarshalMarkdown(metadata []byte, messages []MarkdownMessage) ([]byte, error)

Types

type MarkdownDocument added in v0.1.57

type MarkdownDocument = authored.Document

func ParseMarkdown added in v0.1.57

func ParseMarkdown(raw []byte) (MarkdownDocument, error)

type MarkdownMessage added in v0.1.57

type MarkdownMessage = authored.Message

MarkdownMessage and MarkdownDocument retain Core's local loader API while Forge supplies the shared grammar used by AIStudio and other producers.

Jump to

Keyboard shortcuts

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