Skip to content

julianfrank/cskv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoDoc Coverage Status Build Status Go Report Card Gitter

Comma Separate Key Value

package for Quick Key-Value Array Sharing and usage in Text based messages

Usage

Just import this package

import "github.com/julianfrank/cskv"

New(string)

New(string) => KV Object

mystr := "one:onevalue,two:twovalue"

mykv:=cskv.New(mystr)

// Output : KV Object

KV.String()

log.Print(mykv.String())
// Output : one:onevalue,two:twovalue

Same Output for log.Print(mykv.Str)

Use

Use(map[string]string) => string in :,: format

mymap:=make(map[string]string)
mymap["one"]="onevalue"
mymap["two"]="twovalue"

mystr := cskv.Use(mymap).String()
[or]
mystr := cskv.Use(mymap).Str

// Output : "one:onevalue,two:twovalue"

To Be Done

  • Get/Set per key on KV Object
  • JSON Export

License

MIT

Releases

No releases published

Packages

No packages published

Languages