如何在Go中获取应用程序版本?

huangapple go评论82阅读模式
英文:

how can I get the app version in Go?

问题

我想将我在app.yaml中设置的版本作为查询字符串变量用于我的css和js文件,这样当我更新我的应用程序时,用户的浏览器将获取最新版本(如果已被缓存)。我找不到关于"appengine"包的好参考资料,我认为这个包中有我正在寻找的变量。有人可以帮帮我吗?

英文:

I want to use the version that I have set in app.yaml as a querystring variable for my css and js files, so that my user's browsers will grab the latest version if it has been cached when I update my app. I cannot find a good reference for the "appengine" package, which I assume has the variable that I am looking for. Can anyone help me out?

答案1

得分: 2

请查看以下的appengine/context方法:

https://developers.google.com/appengine/docs/go/reference#VersionID

英文:

See the following appengine/context method:

https://developers.google.com/appengine/docs/go/reference#VersionID

huangapple
  • 本文由 发表于 2013年4月15日 23:12:18
  • 转载请务必保留本文链接:https://go.coder-hub.com/16018738.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定