xstarlark

package
v0.0.0-...-8e6cb86 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Fmt = starfmt.Fmt

Functions

func FmtCheck

func FmtCheck(path string, cfg FmtConfig) error

func FmtFix

func FmtFix(path string, cfg FmtConfig) error

func UnpackDistructTo

func UnpackDistructTo(v starlark.Value, pairs ...interface{}) error

func UnpackOne

func UnpackOne(v starlark.Value, target any) error

Types

type Distruct

type Distruct struct {
	// contains filtered or unexported fields
}

Distruct is a Type that can unpack a string-keyed dist or struct

func UnpackDistruct

func UnpackDistruct(v starlark.Value) (*Distruct, error)

func (*Distruct) Items

func (s *Distruct) Items() StringItems

func (*Distruct) Unpack

func (s *Distruct) Unpack(v starlark.Value) error

type FmtConfig

type FmtConfig = starfmt.Config

type KV

type KV interface {
	Items() StringItems
}

type Listable

type Listable[T any] []T

func (*Listable[T]) Unpack

func (c *Listable[T]) Unpack(v starlark.Value) error

type StringItem

type StringItem struct {
	Key   string
	Value starlark.Value
}

type StringItems

type StringItems []StringItem

func (StringItems) Tuples

func (s StringItems) Tuples() []starlark.Tuple

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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