Skip to content

Commit bbb6a17

Browse files
committed
add comments
fix golint issues: Exported user-defined identifiers need to be commented
1 parent 6b84cba commit bbb6a17

23 files changed

+91
-17
lines changed

common/meta.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
package common
22

3+
// AppVersion is a version number for this module.
34
const AppVersion = "0.3.5"

server_generator/bootstrap_template.go

+2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
package main
22

3+
// BootstrapTemplate ...
34
type BootstrapTemplate struct {
45
AppVersion string
56
PackageName string
67
Bootstraps []*BootstrapTemplates
78
}
89

10+
// BootstrapTemplates ...
911
type BootstrapTemplates struct {
1012
ParentPackageName string
1113
RouteGroupName string

server_generator/controller_template.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package main
22

3+
// ControllerTemplate ...
34
type ControllerTemplate struct {
45
AppVersion string
56
Package string

server_generator/package_struct.go

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package main
22

33
import "go/ast"
44

5+
// PackageStruct ...
56
type PackageStruct struct {
67
FileName string
78
PackageName string

server_generator/package_struct_pair.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package main
22

3+
// PackageStructPair ...
34
type PackageStructPair struct {
45
FileName string
56
LastParam string

server_generator/request_param.go

+4
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
package main
22

3+
// RequestParam ...
34
type RequestParam struct {
45
Name string
56
Type RequestParamType
67
DataType string
78
}
89

10+
// RequestParamType ...
911
type RequestParamType string
1012

13+
// request param types
1114
const (
1215
QueryRequestName RequestParamType = "query"
1316
PathRequestName RequestParamType = "path"
1417
BodyRequestName RequestParamType = "body"
1518
)
1619

20+
// data types
1721
const (
1822
StringRequestDataType string = "string" // string
1923
IntegerRequestDataType string = "integer" // int, uint, uint32, uint64

server_generator/routes_template.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package main
22

3+
// RoutesTemplate ...
34
type RoutesTemplate struct {
45
AppVersion string
56
Package string

server_generator/sample/post_create_table_controller_gen.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// generated version: 0.3.5
2+
13
package sample
24

35
import (
@@ -7,15 +9,17 @@ import (
79
"github.com/labstack/echo/v4"
810
)
911

12+
// PostCreateTableController ...
1013
type PostCreateTableController struct {
1114
}
1215

16+
// NewPostCreateTableController ...
1317
func NewPostCreateTableController() *PostCreateTableController {
1418
p := &PostCreateTableController{}
1519
return p
1620
}
1721

18-
// PostCreateTable
22+
// PostCreateTable ...
1923
// @Summary WIP
2024
// @Description WIP
2125
// @Accept json

server_generator/sample/post_create_user_controller_gen.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// generated version: 0.3.5
2+
13
package sample
24

35
import (
@@ -7,15 +9,17 @@ import (
79
"github.com/labstack/echo/v4"
810
)
911

12+
// PostCreateUserController ...
1013
type PostCreateUserController struct {
1114
}
1215

16+
// NewPostCreateUserController ...
1317
func NewPostCreateUserController() *PostCreateUserController {
1418
p := &PostCreateUserController{}
1519
return p
1620
}
1721

18-
// PostCreateUser
22+
// PostCreateUser ...
1923
// @Summary WIP
2024
// @Description WIP
2125
// @Accept json

server_generator/sample/service/get_article_controller_gen.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// generated version: 0.3.5
2+
13
package service
24

35
import (
@@ -6,15 +8,17 @@ import (
68
"github.com/labstack/echo/v4"
79
)
810

11+
// GetArticleController ...
912
type GetArticleController struct {
1013
}
1114

15+
// NewGetArticleController ...
1216
func NewGetArticleController() *GetArticleController {
1317
g := &GetArticleController{}
1418
return g
1519
}
1620

17-
// GetArticle
21+
// GetArticle ...
1822
// @Summary WIP
1923
// @Description WIP
2024
// @Accept json

server_generator/sample/service/static_page/get_static_page_controller_gen.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// generated version: 0.3.5
2+
13
package static
24

35
import (
@@ -6,15 +8,17 @@ import (
68
"github.com/labstack/echo/v4"
79
)
810

11+
// GetStaticPageController ...
912
type GetStaticPageController struct {
1013
}
1114

15+
// NewGetStaticPageController ...
1216
func NewGetStaticPageController() *GetStaticPageController {
1317
g := &GetStaticPageController{}
1418
return g
1519
}
1620

17-
// GetStaticPage
21+
// GetStaticPage ...
1822
// @Summary WIP
1923
// @Description WIP
2024
// @Accept json

server_generator/sample/service/user/post_update_user_name_controller_gen.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// generated version: 0.3.5
2+
13
package user
24

35
import (
@@ -6,15 +8,17 @@ import (
68
"github.com/labstack/echo/v4"
79
)
810

11+
// PostUpdateUserNameController ...
912
type PostUpdateUserNameController struct {
1013
}
1114

15+
// NewPostUpdateUserNameController ...
1216
func NewPostUpdateUserNameController() *PostUpdateUserNameController {
1317
p := &PostUpdateUserNameController{}
1418
return p
1519
}
1620

17-
// PostUpdateUserName
21+
// PostUpdateUserName ...
1822
// @Summary WIP
1923
// @Description WIP
2024
// @Accept json

server_generator/sample/service/user/post_update_user_password_controller_gen.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// generated version: 0.3.5
2+
13
package user
24

35
import (
@@ -6,15 +8,17 @@ import (
68
"github.com/labstack/echo/v4"
79
)
810

11+
// PostUpdateUserPasswordController ...
912
type PostUpdateUserPasswordController struct {
1013
}
1114

15+
// NewPostUpdateUserPasswordController ...
1216
func NewPostUpdateUserPasswordController() *PostUpdateUserPasswordController {
1317
p := &PostUpdateUserPasswordController{}
1418
return p
1519
}
1620

17-
// PostUpdateUserPassword
21+
// PostUpdateUserPassword ...
1822
// @Summary WIP
1923
// @Description WIP
2024
// @Accept json

server_generator/sample/service/user2/_userID/_JobID/put_job_controller_gen.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// generated version: 0.3.5
2+
13
package _JobID
24

35
import (
@@ -6,15 +8,17 @@ import (
68
"github.com/labstack/echo/v4"
79
)
810

11+
// PutJobController ...
912
type PutJobController struct {
1013
}
1114

15+
// NewPutJobController ...
1216
func NewPutJobController() *PutJobController {
1317
p := &PutJobController{}
1418
return p
1519
}
1620

17-
// PutJob
21+
// PutJob ...
1822
// @Summary WIP
1923
// @Description WIP
2024
// @Accept json

server_generator/sample/service/user2/_userID/get_user_job_get_controller_gen.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// generated version: 0.3.5
2+
13
package _userID
24

35
import (
@@ -6,15 +8,17 @@ import (
68
"github.com/labstack/echo/v4"
79
)
810

11+
// GetUserJobGetController ...
912
type GetUserJobGetController struct {
1013
}
1114

15+
// NewGetUserJobGetController ...
1216
func NewGetUserJobGetController() *GetUserJobGetController {
1317
g := &GetUserJobGetController{}
1418
return g
1519
}
1620

17-
// GetUserJobGet
21+
// GetUserJobGet ...
1822
// @Summary WIP
1923
// @Description WIP
2024
// @Accept json

server_generator/sample/service/user2/get_user_controller_gen.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// generated version: 0.3.5
2+
13
package user2
24

35
import (
@@ -6,15 +8,17 @@ import (
68
"github.com/labstack/echo/v4"
79
)
810

11+
// GetUserController ...
912
type GetUserController struct {
1013
}
1114

15+
// NewGetUserController ...
1216
func NewGetUserController() *GetUserController {
1317
g := &GetUserController{}
1418
return g
1519
}
1620

17-
// GetUser
21+
// GetUser ...
1822
// @Summary WIP
1923
// @Description WIP
2024
// @Accept json

server_generator/sample/service/user2/post_update_user_name_controller_gen.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// generated version: 0.3.5
2+
13
package user2
24

35
import (
@@ -6,15 +8,17 @@ import (
68
"github.com/labstack/echo/v4"
79
)
810

11+
// PostUpdateUserNameController ...
912
type PostUpdateUserNameController struct {
1013
}
1114

15+
// NewPostUpdateUserNameController ...
1216
func NewPostUpdateUserNameController() *PostUpdateUserNameController {
1317
p := &PostUpdateUserNameController{}
1418
return p
1519
}
1620

17-
// PostUpdateUserName
21+
// PostUpdateUserName ...
1822
// @Summary WIP
1923
// @Description WIP
2024
// @Accept json

server_generator/sample/service/user2/post_update_user_password_controller_gen.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// generated version: 0.3.5
2+
13
package user2
24

35
import (
@@ -6,15 +8,17 @@ import (
68
"github.com/labstack/echo/v4"
79
)
810

11+
// PostUpdateUserPasswordController ...
912
type PostUpdateUserPasswordController struct {
1013
}
1114

15+
// NewPostUpdateUserPasswordController ...
1216
func NewPostUpdateUserPasswordController() *PostUpdateUserPasswordController {
1317
p := &PostUpdateUserPasswordController{}
1418
return p
1519
}
1620

17-
// PostUpdateUserPassword
21+
// PostUpdateUserPassword ...
1822
// @Summary WIP
1923
// @Description WIP
2024
// @Accept json

server_generator/sample2/api/event/_eventID/room/get_room_controller_gen.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// generated version: 0.3.4
1+
// generated version: 0.3.5
2+
23
package room
34

45
import (
@@ -7,15 +8,17 @@ import (
78
"github.com/labstack/echo/v4"
89
)
910

11+
// GetRoomController ...
1012
type GetRoomController struct {
1113
}
1214

15+
// NewGetRoomController ...
1316
func NewGetRoomController() *GetRoomController {
1417
g := &GetRoomController{}
1518
return g
1619
}
1720

18-
// GetRoom
21+
// GetRoom ...
1922
// @Summary WIP
2023
// @Description WIP
2124
// @Accept json

0 commit comments

Comments
 (0)