entity

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnmarshalTo

func UnmarshalTo(data []byte, f Format, v any) error

UnmarshalTo unmarshals data in format f into v.

Types

type Config

type Config struct {
	Path    string
	Modules config.Modules
	Logger  log.Logger
}

func (*Config) Load

func (c *Config) Load() (config.Provider, error)

type Format

type Format string

Format 文件格式类型

const (
	TOML Format = "toml"
)

TOML 支持的格式,为简单示例,只支持TOML格式

func FormatFromString

func FormatFromString(formatStr string) Format

FormatFromString turns formatStr, typically a file extension without any ".", into a Format. It returns an empty string for unknown formats. Hugo 实现

Jump to

Keyboard shortcuts

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