I think I'm very likely misunderstanding your question. Would you mind providing more detail?
You can definitely call methods within a function, even if they're defined in the same package. In this example, I call a method from the type "myInt" in the main function: https://play.golang.org/p/AAjVZCncUFJ On Tue, Jul 21, 2020 at 9:51 AM Rudra <[email protected]> wrote: > Hi, > One can call global function of same package from inside a function, But I > am curious if I can call a method from inside a function? > > -- > 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]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/cc1869a9-d6a2-4a2f-890d-d728439fa4c0n%40googlegroups.com > <https://groups.google.com/d/msgid/golang-nuts/cc1869a9-d6a2-4a2f-890d-d728439fa4c0n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAA%3DXfu0V2BMnfBS6TAus2yk4XKob2d9WCH8qiJ3y-8bZis-8Zw%40mail.gmail.com.
