mockHelper

package
v0.0.0-...-add256a Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HtmlStr = `` /* 629-byte string literal not displayed */

)
View Source
var (
	JsonStr = `` /* 368-byte string literal not displayed */

)
View Source
var (
	TextStr = `` /* 479-byte string literal not displayed */

)
View Source
var (
	XmlStr = `` /* 336-byte string literal not displayed */

)

Functions

func GetHtmlData

func GetHtmlData() (result string)

func GetTextData

func GetTextData() (result string)

Types

type Address

type Address struct {
	City, State string
}

type Email

type Email struct {
	Where   string `xml:"where,attr"`
	Address string
}

type Person

type Person struct {
	Name    string `json:"name"`
	Age     int    `json:"age"`
	Address struct {
		StreetAddress string `json:"streetAddress"`
		City          string `json:"city"`
		PostalCode    string `json:"postalCode"`
	} `json:"address"`
	PhoneNumbers []struct {
		Type   string `json:"type"`
		Number string `json:"number"`
	} `json:"phoneNumbers"`
}

func GetJsonData

func GetJsonData() (person Person)

type Result

type Result struct {
	XMLName xml.Name `xml:"Person"`
	Name    string   `xml:"FullName"`
	Phone   string
	Email   []Email
	Groups  []string `xml:"Group>Sample"`
	Address
}

func GetXmlData

func GetXmlData() (result Result)

Jump to

Keyboard shortcuts

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