code: func (gs *goSecurity) generate(dir string) error {
  	fileName := path.Join(dir, "oauth2_"+gs.Name+"_middleware.go")
  	return commons.GenerateFile(gs, "./templates/golang/oauth2_middleware.tmpl", "oauth2_middleware", fileName, true)
  }
docs: // generate Go representation of a security scheme
  // it implemented as struct based middleware