go get specific version - docker

I want to know how go get works, because when im using a libary from github (for example gorilla/mux) the documentation said to install it I should type "go get -u github.com/gorilla/mux", it strange without specific version.!
As far as i know it always use from master branch.
What happen if the owner of the library update the code? Is it gonna be deprecated or something?
Because in my case, im using docker to build the project, every time I build the image, it always do "go get"
Is there any best practice to using go get?

You may use go get library#version. For example, go get foo/bar#v1.2.3

Related

Compiling code of several different languages (go,java,python) and getting a value back

I would like to build a IDE in the browser. Basically a WebApp where you choose which language you want to write code in, then you submit it to an endpoint, and get back the output.
I could not find any docker images that existed and I tried to use Judge but it seems like it is going to cause issues and there is no customer support.
Has anyone built something like this before?

How to make basic changes to ASP.Net Core with Docker Support?

I've created my 'first' ASP.NET Core project with Docker support in VS2017.
I build and run and viola, it 'works'. A browser is launched, it loads http://localhost:32787/api/values and returns the expected "value1","value2" response... All is good.
So now I want to start working with this animal to make it do MY will.. get rid of the valuesController and create my own new testController. On run (select the 'docker' start command) it heads for api/values again...and again. (if I change values to test in the url it works as expected. But how do I get it to STOP going to api/values I cannot find any setting that will affect this change.
launchSettings.json is the 'intuitive' place to look. There I find a setting for launchUrl, which I change, first to just api/test (just as it was api/values OOTB) ... no joy, I go ahead and add the rest of the address
so it reads: http://localhost:32787/api/value...
I do a search on the solution and in the file system and can find the word "Values" NOWHERE.
I have found other articles that get into more advanced routes and adding them to the app.UseMvc() command in the Configuration (great, I'm sure I will need to use that soon) but something, somewhere is telling this project to go to http://localhost:32787/api/values and I want to know where that is and how to change it.
Pardon if this is a duplicate but I have tried any number of google searches for things like 'change default url in asp.net core with docker' and get polluted with irrelevant articles that show me many wonderful things that I don't need to know...YET.
If you are using the latest version of VS, and you added Docker support either during, or after the solution was created, all you have to do is right-click on the project named docker-compose, choose Properties, and you can change the information there.
The default Service URL is what you need to focus on. The Launch Browser is set to Yes by default, which has little value in an API project after a short time. Change these to what you think you need. I set my Launch Browser to No, and in case I ever need it, set the Service URL to one that makes sense after doing some development.
I had a hard time finding these myself the first time I went digging.
In case you try to browse with docker and it doesn't land on desired default route, then in your launchSettings.json, just add your desired prefix to launchUrl in the Docker node. For example to make api as your default route when running docker:
"Docker": {
"commandName": "Docker",
"launchBrowser": true,
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/api"
}

Jenkins: File Operations Plugin

I just started with using jenkins, and learning a lot.
Installed on windows 7.
One thing i can figure out is about File operations plugin.
I don't know how to set up just simple "copy, paste" from one location to another.
Yea maybe is dumb, but i just cant figure out, try a lot of and always got build break.
What i need to set up for simple test ? like i liked to say, show me a door, i'll figure out rest :)
The include file pattern wants an ANT style filter (relative to your workspace as the root).
Include File Pattern: myWorkspaceSubFolder\*.txt
Target location also assumes the root workspace though I guess you can redirect it to another drive.

Xcode won't let me create a snapshot, because I don't exist

just tried to create a snapshot of one of my projects. It didn't work, and Xcode did throw the following error at me: "Unable to create a snapshot. fatal: You don't exist. Go away!"
Source control commit doesn't work either. Ok, obviously there's something wrong with my local repository. I don't have the slightest idea, what that could possibly be, though. I have not committed in quite a while, but except some updates to Xcode itself, nothing major happened to the project folder, as far as I can remember.
So, what can I do about it? Is it possible to deactivate source control for that project and then start over again with source control with the projects current status? I don't need the previous versions anymore, so that doesn't need to be taken care of.
Thank you!
Looking into the git source code, this error message is generated only if
pw = getpwuid(getuid());
fails.
It indicates that the system wasn't able to find an entry for your user account in /etc/passwd or equivalent.
This can happen if your account is removed (via deluser, userdel, or something else) while you're logged in, or if you don't have read permissions on /etc/passwd (the latter should never happen).
Try the following commands at a terminal prompt:
whoami
id
ls -l /etc/passwd
grep "^${USER}:" /etc/passwd
According to the git documentation, this is the meaning of your particular error:
You don't exist. Go away!
The passwd(5) gecos field couldn't be read
This typically means the system doesn't know who you are (you'll see this sort of error on a Linux system if you delete someone's user account while they're still logged in). Is everything else working? That is, can you log out and log back in without a problem? Do other terminal commands operate correctly? What about the id command?
Can you interact with your repository on the command line? What happens if you cd into the directory and try something like git status?
WendiKidd's solution of just starting from scratch is probably the simplest thing to do, assuming it works, but you'll lose any change history already associated with your project.
I had this issue with git and running
dscacheutil -flushcache
in the terminal fixed it.
I would suggest creating a new project entirely, copying your code etc. files out of the old project, and simply migrating over into a new one (which you could then recommit to another source control directory). That seems like the easiest solution; this is a very odd error, and I've come across things in the past that are either unfixable or would take more effort to fix than taking 10-15 minutes to just set up a new project.
So that's what I'd recommend--hopefully that will fix your problem, and whatever xcode is mad at is in some hidden file or the .xcodeproj itself, and not in the files you'd need to migrate over.

Web Part Deployment in SharePoint

I've built a web part and after several deployments to a specific site, SharePoint suddenly won't give the option to deploy to a specifi site, a message is immediatelly displayed that the solution is deplyed globally.
I don't know what I did to cause this. I've been useing stsadmn -o addsolution method, except once when when I tried to just run the Setup.exe file.
Anyone has any idea why is it happenning and how to correct this.
Thanks,
EJM
First make sure to retract the solution (with stsadm), if it doesn't work, use -force/-override, and then delete with the same.
Than try to do it again, and it should work.

Resources