cmap

package
v1.8.10 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CMap

type CMap map[string][]string

func (CMap) Add

func (v CMap) Add(key, value string)

Add adds the value to key. It appends to any existing values associated with key.

func (CMap) CMap

func (v CMap) CMap(values url.Values) CMap

url.Values to CMap

func (CMap) Del

func (v CMap) Del(key string)

Del deletes the values associated with key.

func (CMap) Get

func (v CMap) Get(key string) string

Get gets the first value associated with the given key. If there are no values associated with the key, Get returns the empty string. To access multiple values, use the map directly.

func (CMap) Set

func (v CMap) Set(key, value string)

Set sets the key to value. It replaces any existing values.

func (CMap) Struct

func (v CMap) Struct(value interface{}) error

CMap to struct data value like

type Te struct {
		Name string `json:"name"` // must string type
		ID   string `json:"id"` // must string type
	}

Jump to

Keyboard shortcuts

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