Newbie question here:
I am new to Golang but have used Ruby and Java for quite some time. One
thing I am struggling with that is simple to understand in other languages
is how to I use my code that is within my own project.
Golang allows you to import statements for external code and reference them
with packagename.Method but how exactly do I import code from within my own
project that I would consider helper code or internal library code.
Example:
1. create fileA with AwesomeMethod()
2. create fileB with AwesomeMethod()
3. create fileC with AwesoomeMethod()
4. Keep things DRY
4. change fileA to use fileC.AwesomeMethod()
5. change fileB to use fileC.AwesomeMethod()
How exactly do I do this? In ruby I would require the file and and
possibly use a Namespace to reference that method or include the module.
What do I need to do with Go? Where is this documented as I only see
references to using external packages.
Example repos would be great.
thanks,
Corey
--
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 golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.