I'm writing a CLI in golang that needs to install both Arch official packages and AUR packages. I could treat yay as a CLI and call it via exec, but I thought it would be cool to import it as a dependency to my project and call it's methods directly. Is this possible in yays current state?
Sorry if this is a stupid question. I'm still very new to golang.
It is not a stupid question and is directly connected to #705 since @Morganamilo wants to write an application with somewhat the same requirements as yours. Once that objective is achieved you should be able to call yay as it's own package for a myriad of uses.
That's awesome! Thank you!
Just curious.. the new modules feature being implemented isn't the whole story here right? Without modules i would have expected there to be a yay package i could import into my repo. Modules is nice to get away from GOPATH, but it's always been possible in golang to have a cli application that wraps an importable package right? If so, was yay just not designed in that way and will require some modifications as part of moving to modules?
I think he may have meant this issue instead https://github.com/Jguer/yay/issues/759 ;)
Ah! Okay yeah that makes more sense hah
Exactly :smile: , just searched for modules and misreferenced it
I'm interessed too about this possibility. But it seem that it's been that this post become a bit old.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
It is not a stupid question and is directly connected to #705 since @Morganamilo wants to write an application with somewhat the same requirements as yours. Once that objective is achieved you should be able to call yay as it's own package for a myriad of uses.