September 24, 2022, 2:00pm
Function Undefined while using it from same package
Unable to find out what is going wrong here.
Newly created 2 Files LibConfig and LibSQL, but LibConfig is undefined while calling a function in LibConfig from LibSQL.
NOTE: i want to install this complete project as package to local and use it in other projects
go.mod file here
GitHub - pranavkv/golib_v1
I can import all the functions from files other than LibConfig.
Please help to identify the issue
September 24, 2022, 4:24pm
Files within the same directory are all part of the same package. Try removing the
September 25, 2022, 8:04am
@skillian Could you please let me know how we can install this locally and use it in other projects. Currently i had to commit all the changes to github and create a tag to use it in other projects. Anyway to build and install locally and use it ?
this is how i use it in another project
GitHub - pranavkv/golib_v1 v1.0.1
September 25, 2022, 12:22pm
You could add to the other project’s go.mod file:
replace github.com/pranavkv/golib_v1 => ../golib_v1
Assuming your golib_v1 is beside your other project folder, for example:
└─ go.mod ← This is where you add the replace for ../golib_v1
December 28, 2022, 11:56am
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.