tags

package
v0.0.0-...-891ad17 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeSerializeStructStrings

func DeSerializeStructStrings(s string, res interface{}) error

DeSerializeStructStrings converts a serialized string using our custom serialization format to a struct

func EmptyStruct

func EmptyStruct() error

EmptyStruct demonstrates serialize and deserialize for an Empty struct with tags

func FullStruct

func FullStruct() error

FullStruct demonstrates serialize and deserialize for an Full struct with tags

func SerializeStructStrings

func SerializeStructStrings(s interface{}) (string, error)

SerializeStructStrings converts a struct to our custom serialization format it honors serialize struct tags for string types

Types

type Person

type Person struct {
	Name  string `serialize:"name"`
	City  string `serialize:"city"`
	State string
	Misc  string `serialize:"-"`
	Year  int    `serialize:"year"`
}

Person is a struct that stores a persons name, city, state, and a misc attribute

Jump to

Keyboard shortcuts

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