tags

package
v2.3.55 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Copyright (c) 2020 Khramtsov Aleksei (seniorGolang@gmail.com). This file (tagScanner.go at 14.05.2020, 2:13) is subject to the terms and conditions defined in file 'LICENSE', which is part of this project source code.

Copyright (c) 2020 Khramtsov Aleksei (seniorGolang@gmail.com). This file (tags.go at 14.05.2020, 3:45) is subject to the terms and conditions defined in file 'LICENSE', which is part of this project source code.

Copyright (c) 2020 Khramtsov Aleksei (seniorGolang@gmail.com). This file (unquote.go at 14.05.2020, 2:20) is subject to the terms and conditions defined in file 'LICENSE', which is part of this project source code.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnterminatedString = errors.New("unterminated string")

Functions

func TagScanner

func TagScanner(tagString string) (tags map[string]string, err error)

Types

type DocTags

type DocTags map[string]string

func ParseTags

func ParseTags(docs []string) (tags DocTags)

func (DocTags) Contains

func (tags DocTags) Contains(word string) (found bool)

func (DocTags) IsSet

func (tags DocTags) IsSet(tagName string) (found bool)

func (DocTags) MarshalJSON

func (tags DocTags) MarshalJSON() (bytes []byte, err error)

func (DocTags) Merge

func (tags DocTags) Merge(t DocTags) DocTags

func (DocTags) Set

func (tags DocTags) Set(tagName string, values ...string)

func (DocTags) Sub

func (tags DocTags) Sub(prefix string) (subTags DocTags)

func (DocTags) ToDocs

func (tags DocTags) ToDocs() (docs []string)

func (DocTags) ToKeys

func (tags DocTags) ToKeys(tagName, separator string, defValue ...string) map[string]int

func (DocTags) ToMap

func (tags DocTags) ToMap(tagName, separator, splitter string, defValue ...string) (m map[string]string)

func (DocTags) Value

func (tags DocTags) Value(tagName string, defValue ...string) (value string)

func (DocTags) ValueBool added in v2.3.18

func (tags DocTags) ValueBool(tagName string, defValue ...bool) (value bool)

func (DocTags) ValueInt

func (tags DocTags) ValueInt(tagName string, defValue ...int) (value int)

Jump to

Keyboard shortcuts

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