Forcing GAE to use https is very easy, just need to mention the option “secure” with value “always” in “app.yaml” file (other options are “optional” for using both http & https (default behavior) and “never” for using http only), the example below in for golang app, the same approach is used for other languages.

I’m keeping my projects privately on gitlab.com and want to use for some of my golang packages standard “go get” command instead of using git clone/pull. When I’m trying to use standard commands I’m getting the error

I recently switched my editor for GOLANG from Sublime Text to Visual Studio Code using it together with plugin vscode-go. It is working perfectly and now there is much more pleasant to code in this IDE using GO. But I still missed one feature: debugger. vscode-go supports visual debugging using delve but the issue is that I’m developing with go both for google application engine (GAE) and creating also usual go programs, dalve refused to work when I was trying to debug usual GO programs using GOAPP (I have just a symlink from ‘go’ to ‘goapp’ in SDK, no separate go is installed) giving me the following error:

couldn't detect GO version

Looks like the parser of dalve couldn’t detect version of GO because google adds to it additional information and the output of the command ‘go version’ looks like

go1.6 (appengine-1.9.35)

instead of the standard

go1.6

So, I decided that it can be fixed easily and found this check in the file go_version.go

Next thing I did, I just added the code below in the check to remove this part “(appengine-1.9.35)” from version information, the change should go in line 27 just after ‘if strings.HasPrefix(ver, “go“) {‘ in the file go_version.go

indexStart := strings.Index(ver, "(")

if indexStart > 0 {

indexEnd := strings.Index(ver, ")")

if indexEnd > indexStart {

ver = ver[:indexStart] + ver[indexEnd+1:]

ver = strings.Trim(ver, " ")

}

}

Then I compiled/installed dalve again and my debugger inside of Visual Studio Code started to work!

If you want to create applications with GO, deploy them to google app engine and use Sublime Text as your IDE then this step-by-step tutorial is for you (tutorial is for Mac but it can be used for other platforms)

Go to $GOROOT/bin & $GOROOT/pkg folders and execute the a commands below to create appropriate symlinks (GoSublime does not know anything about ‘goapp’, it knows only about ‘go’, we should simulate it)

cd $GOROOT/bin
ln -s goapp go

cd $GOROOT/pkg
ln -s darwin_amd64_appengine darwin_amd64

Step 6:

Create your first go app for GAE: create folder somewhere and create there 2 files, hello.go with the following content

If you did everything correctly then your Sublime Text should have code completion and console to run go commands. Press in Sublime Text cmd+9 and type ‘build’ in the console, it should compile and build your app. If build is successful then go to terminal and type in the app folder ‘goapp serve’, the app will run locally, you can check it with your web browser on the link http://localhost:8080