Socket
Socket
Sign inDemoInstall

github.com/CharLemAznable/gokits

Package Overview
Dependencies
8
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    github.com/CharLemAznable/gokits

Gypsy is a simplified YAML parser written in Go. It is intended to be used as a simple configuration file, and as such does not support a lot of the more nuanced syntaxes allowed in full-fledged YAML. YAML does not allow indent with tabs, and GYPSY does not ever consider a tab to be a space character. It is recommended that your editor be configured to convert tabs to spaces when editing Gypsy config files. Gypsy understands the following to be a list: This is parsed as a `yaml.YamlList`, and can be retrieved from the `yaml.YamlNode.YamlList()` method. In this case, each element of the `yaml.YamlList` would be a `yaml.YamlScalar` whose value can be retrieved with the `yaml.YamlScalar.String()` method. Gypsy understands the following to be a mapping: A mapping is an unordered list of `key:value` pairs. All whitespace after the colon is stripped from the value and is used for alignment purposes during export. If the value is not a list or a map, everything after the first non-space character until the end of the line is used as the `yaml.YamlScalar` value. Gypsy allows arbitrary nesting of maps inside lists, lists inside of maps, and maps and/or lists nested inside of themselves. A map inside of a list: A list inside of a map: A list of lists: A map of maps: In the case of a map of maps, all sub-keys must be on subsequent lines and indented equally. It is allowable for the first key/value to be on the same line if there is more than one key/value pair, but this is not recommended. Values can also be expressed in long form (leading whitespace of the first line is removed from it and all subsequent lines). In the normal (baz) case, newlines are treated as spaces, all indentation is removed. In the folded case (bar), newlines are treated as spaces, except pairs of newlines (e.g. a blank line) are treated as a single newline, only the indentation level of the first line is removed, and newlines at the end of indented lines are preserved. In the verbatim (foo) case, only the indent at the level of the first line is stripped. The example: The YAML subset understood by Gypsy can be expressed (loosely) in the following grammar (not including comments): Any line where the first non-space character is a sharp sign (#) is a comment. It will be ignored. Only full-line comments are allowed.


Version published

Readme

Source

gokits

Build Status codecov GitHub release (latest by date) MIT Licence GoDoc GitHub code size

Go常用工具包.

boolean

string to bool工具.

cache

重构来自muesli/cache2go

在原有访问缓存过期策略的基础上, 增加写入缓存过期策略.

在原有缓存Loader类型上, 增加异常返回值.

collections

字符串数组/切片工具

cond

条件表达式工具

gql

数据库访问工具

hashset

实现Java HashSet

hashtable

实现Java HashTable

http

HTTP工具

httpdownload

HTTP文件下载

httpelf && httpserver

HTTPServer工具

httpreq

网络请求工具

json

JSON序列化/反序列化工具

line_reader

实现Java LineReader

log4go

本地日志

Fork from https://github.com/alecthomas/log4go

Source Code from http://code.google.com/p/log4go/

Please see http://log4go.googlecode.com/

Installation:

  • Run goinstall log4go.googlecode.com/hg

Usage:

  • Add the following import: import l4g "log4go.googlecode.com/hg"

Acknowledgements:

  • pomack For providing awesome patches to bring log4go up to the latest Go spec
path

路径合并工具

properties

实现Java Properties

random

随机字符串

rsa

RSA非对称加密算法工具, 包括密钥生成, 公钥加密/私钥解密, 私钥签名/公钥验签.

secret

HmacSha256, AES工具

strconv

字符串数字转换工具

yaml

重构来自kylelemons/go-gypsy

ycomb

Go语言实现Y组合子

参考:

使用Lambda 表达式编写递归三:实现 Y 组合子 - 鹤冲天 - 博客园

FAQs

Last updated on 22 Dec 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc