tmpls

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 7 Imported by: 0

README

Tmpls

Go doc

暂无介绍...

目录导航

列出了该 package 下所有的函数及类型定义,可通过目录导航进行快捷跳转 ❤️

展开 / 折叠目录导航

包级函数定义

函数名称 描述
NewGolang 创建一个 Golang 配置导出模板
NewJSON 暂无描述...

类型定义

类型 名称 描述
STRUCT Golang 配置导出模板
STRUCT JSON 暂无描述...

详情信息

func NewGolang(packageName string) *Golang

创建一个 Golang 配置导出模板


func NewJSON() *JSON


Golang STRUCT

配置导出模板

type Golang struct {
	Package   string
	Templates []*pce.TmplStruct
}

func (*Golang) Render(templates ...*pce.TmplStruct) ( string, error)

func (*Golang) GetVariable(config *pce.TmplStruct) string

func (*Golang) GetConfigName(config *pce.TmplStruct) string

func (*Golang) HasIndex(config *pce.TmplStruct) bool

JSON STRUCT
type JSON struct {
	jsonIter.API
}

func (*JSON) Render(data map[any]any) ( string, error)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Golang

type Golang struct {
	Package   string
	Templates []*pce.TmplStruct
}

Golang 配置导出模板

func NewGolang

func NewGolang(packageName string) *Golang

NewGolang 创建一个 Golang 配置导出模板

func (*Golang) GetConfigName

func (slf *Golang) GetConfigName(config *pce.TmplStruct) string

func (*Golang) GetVariable

func (slf *Golang) GetVariable(config *pce.TmplStruct) string

func (*Golang) HasIndex

func (slf *Golang) HasIndex(config *pce.TmplStruct) bool

func (*Golang) Render

func (slf *Golang) Render(templates ...*pce.TmplStruct) (string, error)

type JSON

type JSON struct {
	jsonIter.API
}

func NewJSON

func NewJSON() *JSON

func (*JSON) Render

func (slf *JSON) Render(data map[any]any) (string, error)

Jump to

Keyboard shortcuts

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