ast

package
Version: v6.0.0-...-03bcada Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2017 License: MIT Imports: 2 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParamFuncArgInt

func ParamFuncArgInt(a ParamFuncArg) (int, bool)

func ParamFuncArgInt64

func ParamFuncArgInt64(a ParamFuncArg) (int64, bool)

func ParamFuncArgString

func ParamFuncArgString(a ParamFuncArg) (string, bool)

func ParamFuncArgToInt

func ParamFuncArgToInt(a ParamFuncArg) (int, error)

func ParamFuncArgToInt64

func ParamFuncArgToInt64(a ParamFuncArg) (int64, error)

func ParamFuncArgToString

func ParamFuncArgToString(a ParamFuncArg) (string, error)

Types

type ParamFunc

type ParamFunc struct {
	Name string         // range
	Args []ParamFuncArg // [1,5]
}

range(1,5)

type ParamFuncArg

type ParamFuncArg interface{}

type ParamStatement

type ParamStatement struct {
	Name      string      // id
	Type      ParamType   // int
	Funcs     []ParamFunc // range
	ErrorCode int         // 404
}

type ParamType

type ParamType uint8
const (
	ParamTypeUnExpected ParamType = iota
	// /myparam1
	ParamTypeString
	// /42
	ParamTypeInt
	// /myparam
	ParamTypeAlphabetical
	// /main.css
	ParamTypeFile
	// /myparam1/myparam2
	ParamTypePath
)

func LookupParamType

func LookupParamType(ident string) ParamType

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL