google-app-engine


Get current deployed timestamp in AppEngine/Go


Can I get the deployed timestamp of current application version in AppEngine/Go?
It seems helpful, but not sure how to implement in AppEngine/Go application code.
AppEngine: Get current serving application version
https://godoc.org/google.golang.org/appengine
https://cloud.google.com/appengine/docs/admin-api/v1beta2/reference/apps/modules/versions
From this link AppEngine: Get current serving application version, the suggested answer is written in python
os.environ['CURRENT_VERSION_ID']
Above code is trying to retrieve the environment variable with name CURRENT_VERSION_ID, Equivalent code in go would be:
import (
...
"os"
)
...
versionText := os.Getenv("CURRENT_VERSION_ID")
According to one of the comments, the result would be in this format my-version.383096322806301043, you should use strings.Split method to split it by ., eg:
import (
...
"strings"
)
...
timestampString := strings.Split(versionText, ".")[1]

Related Links

How to get related to db.Model entity from datastore - what API allows it?
GAE-Python: Can Appstats record RPC made in background thread?
Blank Page after granting OAuth2 permission in BigQuery GAE Sample
GAE get Data using JDO with key
Setup GAE project with Resteasy using Maven in Eclipse
Working Maven3 configuration for AppEngine + DataNucleus + JPA 2
Spring Security ACL on App Engine Datastore
JDO 1:N issue (retriving data)
Endpoints Bad Api Configuration
Resolving an invalid memory address or nil pointer dereference
Design suggestion for an app which will wake up periodically and execute some long running tasks
Properly using map[string]interface{}?
Multiple calls to put() method when updating ndb on google app engine
GAE Can't set up a Resident Instance, related to new Migrate Settings option?
Google App Engine - Querying for arrays containing a value
Java App engine backend shuts down abruptly, how to resume work?

Categories

HOME
porting
jmeter
mstest
appcelerator
vimdiff
openpyxl
line
automatic-ref-counting
gkturnbasedmatch
powershell-v5.0
job-scheduling
google-container-registry
inno-download-plugin
jquery-callback
ckfinder
slidetoggle
motion-detection
datastax-enterprise-graph
cppreference
git-squash
sharding
python-import
xajax
reason
xdocreport
linqpad
drupal-theming
httr
getchar
httrack
jquery-ui-draggable
mschart
configurationmanager
geotiff
semantic-logging
css-transforms
jtree
branch-prediction
mapxtreme
flex-monkey
centrifuge
android-dateutils
avspeechsynthesizer
stream-processing
pushbots
blitline
typemock
pyobjc
dbaccess
iiop
cocos3d
device-tree
cuba
winginx
epiceditor
diem
wp7test
superscrollorama
mysql-error-2013
robotlegs
pdfviewer
midlet
azman
google-maps-mobile
webdev.webserver
entitydatasource
http-daemon
socketserver
object-database
int64
soappy
pbcopy

Resources

Encrypt Message