Re:Show HN: Jackal – XMPP server in Go
by lucian1900 on Tuesday May 08, 2018 @11:30AM
(#17021629)
Go's is not much stronger either. It hardly makes any difference.
[ Parent
| on HN ]
You don't known what you're talking about, did you even bother search interface {} in the code?
Re:Show HN: Jackal – XMPP server in Go
by erik_seaberg on Tuesday May 08, 2018 @04:49PM
(#17024918)
Here are methods that store and retrieve … something, probably. The author had to make up method names because map[string]interface{} doesn't have an interface we could satisfy.
func (ctx *Context) SetObject(object interface{}, key string) { … }
func (ctx *Context) Object(key string) interface{} { … }
Here a caller has to provide a method that takes an arbitrary number of … whatever. type rowScanner interface {
Scan(...interface{}) error
}