MM-31063: Change constants to use CamelCase (#16608)

* MM-31063: Change constants to use CamelCase

* store package

* change allcaps to camel case (#16615)

* New tools.mod

Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
Этот коммит содержится в:
Agniva De Sarker
2021-01-04 11:32:29 +05:30
коммит произвёл GitHub
родитель 8b6ac5f5d2
Коммит c1dd23a3c8
158 изменённых файлов: 1485 добавлений и 1479 удалений

Просмотреть файл

@@ -19,12 +19,12 @@ import (
)
const (
OPEN_TRACING_PARAMS_MARKER = "@openTracingParams"
ERROR_TYPE = "error"
OpenTracingParamsMarker = "@openTracingParams"
ErrorType = "error"
)
func isError(typeName string) bool {
return strings.Contains(typeName, ERROR_TYPE)
return strings.Contains(typeName, ErrorType)
}
func main() {
@@ -109,8 +109,8 @@ func extractMethodMetadata(method *ast.Field, src []byte) methodData {
if method.Doc != nil {
for _, comment := range method.Doc.List {
s := comment.Text
if idx := strings.Index(s, OPEN_TRACING_PARAMS_MARKER); idx != -1 {
for _, p := range strings.Split(s[idx+len(OPEN_TRACING_PARAMS_MARKER):], ",") {
if idx := strings.Index(s, OpenTracingParamsMarker); idx != -1 {
for _, p := range strings.Split(s[idx+len(OpenTracingParamsMarker):], ",") {
paramsToTrace[strings.TrimSpace(p)] = true
}
}
@@ -138,7 +138,7 @@ func extractMethodMetadata(method *ast.Field, src []byte) methodData {
}
}
if !found {
log.Fatalf("Unable to find a parameter called '%s' (method '%s') that is mentioned in the '%s' comment. Maybe it was renamed?", paramName, method.Names[0].Name, OPEN_TRACING_PARAMS_MARKER)
log.Fatalf("Unable to find a parameter called '%s' (method '%s') that is mentioned in the '%s' comment. Maybe it was renamed?", paramName, method.Names[0].Name, OpenTracingParamsMarker)
}
}
}