template

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStringLoader

func NewStringLoader() jet.Loader

NewLoader returns an initialized loader serving the passed http.FileSystem.

func Render

func Render(resource *crud.Resource, collection collection.Collection, fnName string, body map[string]interface{}) (map[string]interface{}, error)

根据名称进行匹配

func Sort

func Sort(key string, maps []bson.M, desc bool) []bson.M

Types

type MapsSort

type MapsSort struct {
	Key     string
	MapList []bson.M
	Desc    bool
}

排序 start

func (*MapsSort) Len

func (m *MapsSort) Len() int

func (*MapsSort) Less

func (m *MapsSort) Less(i, j int) bool

func (*MapsSort) Swap

func (m *MapsSort) Swap(i, j int)

Jump to

Keyboard shortcuts

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