Please excuse my ignorance, but I’ve been googling around on this topic for a day or so now and have not found an answer yet, so I am posting here in the hopes some one can shed some light on this.
As a C coder it is common to create a library for functions that would be used by multiple applications, such as static myutils.a or shared my myutils.so. And these types of libs would typically be put in a lib directory at the same tier as the various apps that linked to them. So a typical tree might look like:
/lib/file1.c, file2.c, file3.c compile into myutils.so or myutils.a
then any or all of the apps could link to the myutils.a or myutils.so in the lib directory by setting the LD_PATH. I found this to be a common method used in several companies I’ve worked at over the years for building applications in C and CPP. And also I’ve found it to be a very comfortable development model for application compiling so I was trying to emulate this method in Golang and found it quite problematic. In particular creating the actual libraries out of packages seems to be a bit of an ordeal. I have read through a few docs but to no avail. I did come across a few docs on linking shared package files, but those links were inaccurate and did not work. Can anyone tell is this is possible? and if so could some one point me to a relevant link or document. I do appreciate any help you could give on this.