config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package config contains configuration structs and corresponding I/O functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConfig

func DefaultConfig(outDir, pkg, version string) string

Types

type BindingList

type BindingList struct {
	Enabled map[string]bool
}

func LoadBindingListFromFile

func LoadBindingListFromFile(filename string) (*BindingList, error)

func NewBindingList

func NewBindingList() *BindingList

func (*BindingList) SaveToFile

func (bl *BindingList) SaveToFile(filename string, bindingFuncsToDocstrs map[string]string) error

type Config

type Config struct {
	OutDir         string      `toml:"out-dir"`
	Package        string      `toml:"package"`
	Version        string      `toml:"version"`
	CutNew         bool        `toml:"cut-new"`
	BuildFlag      string      `toml:"build-flag,omitempty"`
	NoPrefix       []string    `toml:"no-prefix,omitempty"`
	CustomPrefixes [][2]string `toml:"custom-prefixes,omitempty"` // {prefix, package}
	IncludeStdLibs []string    `toml:"include-std-libs"`
}

func ReadConfigFromFileOrCreateDefault

func ReadConfigFromFileOrCreateDefault(path string) (cfg *Config, createdDefault bool, err error)

Jump to

Keyboard shortcuts

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