helper

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Trading = &trading{}

Functions

func FormatAdminTag

func FormatAdminTag(tag string) string

func GetAdminTagNames

func GetAdminTagNames(tags []*types.AdminTag) []string

GetAdminTagNames gets admin tag name from AdminTagField.

func GetBusiness

func GetBusiness(r *http.Request) *types.BusinessData

func GetRegisterData

func GetRegisterData(r *http.Request) *types.RegisterData

func GetTagNames

func GetTagNames(tags []*types.TagField) []string

GetTagNames gets tag name from TagField.

func GetTags

func GetTags(words string) []*types.TagField

GetTags transforms tags from the user inputs into a standard format. dog walking -> dog-walking (one word)

func GetUpdateData

func GetUpdateData(r *http.Request) *types.UpdateAccountData

func GetUser

func GetUser(r *http.Request) *types.User

func SameTags

func SameTags(new, old []*types.TagField) bool

func TagDifference

func TagDifference(tags, oldTags []*types.TagField) ([]string, []string)

TagDifference finds out the new added tags.

func ToSearchTags

func ToSearchTags(words string) []*types.TagField

ToSearchTags transforms tags from user inputs into searching tags. dog walking -> dog, walking (two words)

func ToTagFields

func ToTagFields(tags []string) []*types.TagField

ToTagFields converts tags into TagFields.

Types

This section is empty.

Jump to

Keyboard shortcuts

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