How to develop golang modules efficiently [closed] - go

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 1 year ago.
Improve this question
I'm developing a golang project and a shared module simultaneously.
I feel the process is annoying If shared module is modified.
steps:
write something in shared module and give it a new GIT tag.
get latest module version in my project
test, if any bug is found, back to step (1)
Can anyone give a more efficient way?

While you're developing, I'd recommend just using replace directives in your go.mod to make any changes in dependencies instantly visible (regardless of version) to client code.
E.g. if you have package "client" using package "auth":
$SOMEDIR/client/go.mod would replace dependency on client with $SOMEDIR/auth, and now you can just develop the two alongside each other in $SOMEDIR, commit changes to source control, etc.
When you're ready to "ship" it, you'll have to create an actual version for these modules. That is, if you even want auth to be separately usable from client. Consider keeping everything as private as possible (using internal).
Read this official documentation on the subject for more details

Related

Azure Devops pipeline - C++ - Whitesource Bolt [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 1 year ago.
Improve this question
I have a project, written in C++, and built into docker image. I used some opensource libraries (nlohmann json, gtest, cpr etc) in my project.
Now, i was trying to find open source vulnerabilities using Whitesource Bolt. I added the extension to Azure pipeline task.
I wonder, how Whitesource Bolt identifies vulnerabilities in those opensource modules. i read that, they will create a digital signature and compare it with their database.
But, can anyone describe how they are creating digital signature, or how they are identifying open source modules in our code ?
Every open source modules have their special digital signature. Whitesource Bolt calculates these digital signatures to find open source modules.

How to use Golang's go mod dependency management behind proxy? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
I am trying to set up a project with a gonum dependency and ran into the problem that we have a corporate proxy that blocks many destinations in the internet.
github.com is available over https.
gonum.org is not.
The gonum repository is hosted on github. Gonum.org forwards to it in some way, as the repo that is checked out in gonum.org/v1/gonum is just a github clone. Using the go mod tooling by default will fetch all code, which fails since the github urls are aliased to gonum.org which the proxy will block.
Is there a way to download gonum via github and use symlinks/copying around to still be able to use it?
It is possible with go modules. Once you downloaded the gonum sources on your computer, you can tell go to use your local copy instead of the remote one using the replace instruction in your go.mod
Syntax is
module example.com/me/hello
require (
example.com/me/goodbye v0.0.0
)
replace example.com/me/goodbye => ../goodbye
https://github.com/golang/go/wiki/Modules#can-i-work-entirely-outside-of-vcs-on-my-local-filesystem
It is also possible to setup a proxy outside of your corporate network if the solution given above is not adapted to your team: https://github.com/golang/go/wiki/Modules#are-there-always-on-module-repositories-and-enterprise-proxies

How to organize a Go project [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I am working on a new Golang application which involves some proprietary code and also includes some open sources packages. The code will be part of an enterprise GitHub repository.
We don't plan to keep using the latest versions of the open source packages and would want to keep a stable version of the packages. In this context what is the best way to organize the code? From what I have read so far the best way to put the opensource packages into the Vendors directory.
In any case, a clear project layout is something we want to have in the beginning to keep things simple in the long run.
If you are using a version of Go < 1.11, you can take a look at dep for dependency management :
a dep init will generate the layout (see Creating a New Project)
a Gopkg.lock file will handle specific revisions for each dependency, thus ensuring the stability of your build (instead of having different developers using different versions of the same dependency, depending on when they go get that dependency).
However, if you are using a version of Go >= 1.11, as #oren points out in the comments section (credits to him), you'd probably want to use Go modules instead, as it is now introduced in the Go tool chain.

OSX installer Package plugin [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I am trying to package an application I have been working on using OSX. I have the package created and I can do some basic (check system values etc) checks.
What I now want to do is to gather end user data during the install so I can create a custom config file.
I understand I must use installer plugins to do this but I cannot find any useful information to do this.
Can people please share resources, link or useful tips to help me do this.
(Super) late answer, but am currently doing this. I'm using packages. Its a program which will build an installer for you.
What you do is supply it your.app and an installer plugin, and off you go. (You can create installer plugins in Xcode when it asks you what type of project you want to work on).
Regarding problem you are solving specifically, my solution was to get the input configs from the user from the plugin I wrote. The plugin would then write these configs to a file in a temp location. I then modified my app to look for these configs and read them from there.
Note: your plugin will not run with admin privileges (even if you ticked the box in the for this in the packages app). If you need to have admin privileges, consider adding a post-install script in packages (and make sure you enable "Require admin password for installation" in the "settings" tab)

What would you want in a self-hosted project support/information web app? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
My next project will be a lightweight PHP alternative to Trac, since Trac is often confusing to install and is often a little too big or feature-rich for smaller project.
Features planned so far:
Wiki
Bug tracker
Forum(s)
Static pages (easily edited of course)
Markdown support
No code repo hosting (I consider this a feature since most people would prefer to use a 3rd party such as GitHub for the actual code hosting)
My question: if you were to use a self-hosted app for making a website about one of your open source projects, what would you want? Is there anything on that list that's missing? Would you absolutely require the ability to actually host the code repo on the site itself, or would you be ok hosting the code elsewhere (Google Code, GitHub, BitBucket), and using the site only to upload major versions?
Summary: if you were to use a self-hosted app to provide info and support for an open source project of yours, what would you want it to be like?
Redmine is my current favorite, I usually install it via BitNami

Resources