Functions prefixed with Get should return a value RVV-A0006
Anti-pattern
Major
6 months ago3 years old
function 'GetEmptyBody' seems to be a getter but it does not return any result
  96	tc.Ctx.WriteString(tc.Ctx.Input.Query(":id") + tc.Ctx.Input.Query(":page"))
  97}
  98
  99func (tc *TestController) GetEmptyBody() { 100	var res []byte
 101	tc.Ctx.Output.Body(res)
 102}
function 'GetManyRouter' seems to be a getter but it does not return any result
  92		tc.Ctx.Input.Query(":first") + "+" + tc.Ctx.Input.Query("learn"))
  93}
  94
  95func (tc *TestController) GetManyRouter() {  96	tc.Ctx.WriteString(tc.Ctx.Input.Query(":id") + tc.Ctx.Input.Query(":page"))
  97}
  98
function 'GetParams' seems to be a getter but it does not return any result
  87	tc.Ctx.Output.Body([]byte(tc.URLFor(".Myext")))
  88}
  89
  90func (tc *TestController) GetParams() {  91	tc.Ctx.WriteString(tc.Ctx.Input.Query(":last") + "+" +
  92		tc.Ctx.Input.Query(":first") + "+" + tc.Ctx.Input.Query("learn"))
  93}
function 'GetURL' seems to be a getter but it does not return any result
  83	tc.Ctx.Output.Body([]byte(tc.Ctx.Input.Param(":ext")))
  84}
  85
  86func (tc *TestController) GetURL() {  87	tc.Ctx.Output.Body([]byte(tc.URLFor(".Myext")))
  88}
  89
function 'GetFixedLevel2' seems to be a getter but it does not return any result
 68	tc.Ctx.Output.Body([]byte(contentLevel1Replacement))
 69}
 70
 71func (tc *TestPostUnregController) GetFixedLevel2() { 72	tc.Ctx.Output.Body([]byte(contentLevel2Replacement))
 73}
 74