mirror of
https://github.com/beego/bee.git
synced 2024-11-22 05:00:54 +00:00
update version
This commit is contained in:
parent
22f4c92022
commit
d30c68e72f
@ -49,7 +49,7 @@ var rootapi swagger.ResourceListing
|
|||||||
var apilist map[string]*swagger.ApiDeclaration
|
var apilist map[string]*swagger.ApiDeclaration
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
basepath := "/v1"
|
basepath := "{{.version}}"
|
||||||
err := json.Unmarshal([]byte(rootinfo), &rootapi)
|
err := json.Unmarshal([]byte(rootinfo), &rootapi)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
beego.Error(err)
|
beego.Error(err)
|
||||||
@ -150,6 +150,7 @@ func generateDocs(curpath string) {
|
|||||||
case *ast.AssignStmt:
|
case *ast.AssignStmt:
|
||||||
for _, l := range smtp.Rhs {
|
for _, l := range smtp.Rhs {
|
||||||
f, params := analisysNewNamespace(l.(*ast.CallExpr))
|
f, params := analisysNewNamespace(l.(*ast.CallExpr))
|
||||||
|
globalDocsTemplate = strings.Replace(globalDocsTemplate, "{{.version}}", f, -1)
|
||||||
for _, p := range params {
|
for _, p := range params {
|
||||||
switch pp := p.(type) {
|
switch pp := p.(type) {
|
||||||
case *ast.CallExpr:
|
case *ast.CallExpr:
|
||||||
|
Loading…
Reference in New Issue
Block a user