utils

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2022 License: Apache-2.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SubStrByStartBefore

func SubStrByStartBefore(str string, start string) string

SubStrByStartBefore 字符串截取 从尾部开始查找,返回从头到查找位置

func SubstrByStartAfter

func SubstrByStartAfter(str string, start string) string

SubstrByStartAfter 字符串截取 从尾部开始查找,返回查找位置到尾部的字符串

Types

type Config

type Config interface {
	// Read 将配置文件信息解析到指定的对象
	Read(interface{}) error
}

Config 读取配置文件

func NewConfig

func NewConfig(file string) Config

NewConfig 创建Config实例

type ParseTmpl

type ParseTmpl interface {
	// Parse 提供模板解析函数
	Parse(interface{}) (*bytes.Buffer, error)
}

ParseTmpl 提供模板解析接口

func NewParseTmpl

func NewParseTmpl(tmpl interface{}) ParseTmpl

NewParseTmpl 创建新的ParseTmpl实例

Jump to

Keyboard shortcuts

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