2022-04-03 04:07:16 +00:00
|
|
|
# Opinionated Golang tag parser
|
|
|
|
|
|
|
|
[![Build Status](https://travis-ci.org/vmihailenco/tagparser.png?branch=master)](https://travis-ci.org/vmihailenco/tagparser)
|
|
|
|
[![GoDoc](https://godoc.org/github.com/vmihailenco/tagparser?status.svg)](https://godoc.org/github.com/vmihailenco/tagparser)
|
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
|
|
|
Install:
|
|
|
|
|
|
|
|
```shell
|
2023-07-03 20:21:30 +00:00
|
|
|
go get github.com/vmihailenco/tagparser/v2
|
2022-04-03 04:07:16 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## Quickstart
|
|
|
|
|
|
|
|
```go
|
|
|
|
func ExampleParse() {
|
|
|
|
tag := tagparser.Parse("some_name,key:value,key2:'complex value'")
|
|
|
|
fmt.Println(tag.Name)
|
|
|
|
fmt.Println(tag.Options)
|
|
|
|
// Output: some_name
|
|
|
|
// map[key:value key2:'complex value']
|
|
|
|
}
|
|
|
|
```
|