toolbox

package
v0.0.0-...-678b904 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	COMMENTS = byte(35) // 对应#
	WARP     = byte(10) // 对应换行键
)

ASCII 码表

Variables

This section is empty.

Functions

func ChangeSetting

func ChangeSetting(filename string, s map[string]string) []string

修改配置,filename 配置文件名称 需要修改的配置键值对

func ConfigRead

func ConfigRead(iobyte []byte) map[string]string

返回 解析过的K和V MAP[string][string]

func GetCookieStr

func GetCookieStr(r *http.Request, str string) string

获得一个cookie.Name的cookie.Value 如果不存在返回空字符串.

func IsConfigSource

func IsConfigSource(programpath string) bool

判断源配置文件是否存在

func IsCookieStr

func IsCookieStr(r *http.Request, str string) bool

判断是否有这个cookie.Nema 存在返回true.

func OpenConfig

func OpenConfig(filename string) map[string]string

获得配置文件的设置 返回键值对

func OutConfig

func OutConfig(filename string, s []string)

输出配置文件 filename 文件输出的路径和文件名 不存在则自动创建,如果存在则覆盖 s []string 配置数据

func SetTempCookie

func SetTempCookie(k, v string, w http.ResponseWriter)

设置一个临时的Cookit. 浏览器关闭后失效.

func SettingMatch

func SettingMatch(m, s map[string]string) map[string]string

遍历s中的键,m中是否存在,存在则用s的值覆盖m的值

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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