Hi,
I just read this content as I was looking for same thing, I tried as you
suggested but was unable to do so, as I am using function calls from
different packages.
My request flow is some what like this:
> package global
>
> type Context struct {
> logger log.Logger
> }
>
package controller
> func A(w http.ResponseWriter, req *http.Request) {
>
> ABC.B()
> XYZ.C()
> }
>
package ABC
> func B() {
> QWE.D()
>
> // ...
> }
>
package XYZ
> func C() {
>
// ...
> }
>
>
>
package QWE
func D(){
//....
}
I tried to define function B,C,D on global Context structure but was giving
error. Please suggest how to resolve this.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.