go-siris / siris

DEPRECATED: The community driven fork of Iris. The fastest web framework for Golang!
Other
142 stars 16 forks source link

may u add these functions? #70

Open go-xworkflow opened 7 years ago

go-xworkflow commented 7 years ago

may u add these functions?

context.URLParamBool(name string) (bool,error) context.URLParamTrim(name string) string context.URLParamEscape(name string) string context.URLParamFloat64(name string) (float64, error)

context.PostValueTrim(name string) string context.PostValueEscape(name string) string context.PostBool(name string) (bool,error) context.PostInt(name string) (int, error) context.PostInt64(name string) (int64, error) context.PostFloat64(name string) (float64, error) context.PostStrings(name string) ([]string, error)

context.Params().GetTrim(name string) string context.Params().GetEscape(name string) string context.Params().GetBool(name string) (bool,error) context.Params().GetFloat64(name string) (float64, error)

Dexus commented 7 years ago

Can you create some examples for each function so we can see what it should expect as input?

Von meinem iPhone gesendet

Am 05.09.2017 um 15:52 schrieb go-xworkflow notifications@github.com:

may u add these functions?

context.URLParamBool(name string) (bool,error) context.URLParamTrim(name string) string context.URLParamEscape(name string) string context.URLParamFloat64(name string) (float64, error)

context.PostValueTrim(name string) string context.PostValueEscape(name string) string context.PostBool(name string) (bool,error) context.PostInt(name string) (int, error) context.PostInt64(name string) (int64, error) context.PostFloat64(name string) (float64, error) context.PostStrings(name string) ([]string, error)

context.Params().GetTrim(name string) string context.Params().GetEscape(name string) string context.Params().GetBool(name string) (bool,error) context.Params().GetFloat64(name string) (float64, error)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

go-xworkflow commented 7 years ago

i think like this https://github.com/go-macaron/macaron/blob/master/context.go

// QueryTrim querys and trims spaces form parameter.
Context.QueryTrim(name string) string
// QueryStrings returns a list of results by given query name.
Context.QueryStrings(name string) []string
// QueryEscape returns escapred query result.
Context.QueryEscape(name string) string
// QueryFloat64 returns query result in float64 type.
Context.QueryFloat64(name string) float64
// QueryBool returns query result in bool type.
Context.QueryBool(name string) bool
Dexus commented 7 years ago

Yeah that should be possible, give me some days. I'm a bit busy at the moment.

Von meinem iPhone gesendet

Am 05.09.2017 um 17:08 schrieb go-xworkflow notifications@github.com:

i think like this https://github.com/go-macaron/macaron/blob/master/context.go

// QueryTrim querys and trims spaces form parameter. Context.QueryTrim(name string) string // QueryStrings returns a list of results by given query name. Context.QueryStrings(name string) []string // QueryEscape returns escapred query result. Context.QueryEscape(name string) string // QueryFloat64 returns query result in float64 type. Context.QueryFloat64(name string) float64 // QueryBool returns query result in bool type. Context.QueryBool(name string) bool — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.