// VisitRPC checks the rpc.
VisitRPC checks the rpc.
// VisitRPC checks the rpc .
func (v *rpcNamesUpperCamelCaseVisitor) VisitRPC(rpc *parser.RPC) bool {
	name := rpc.RPCName
	if !strs.IsUpperCamelCase(name) {
		expected := strs.ToUpperCamelCase(name)
		v.AddFailuref(rpc.Meta.Pos, "RPC name %q must be UpperCamelCase like %q", name, expected)
		err := v.Fixer.SearchAndReplace(rpc.Meta.Pos, func(lex *lexer.Lexer) fixer.TextEdit {
			lex.NextKeyword()
			lex.Next()
			return fixer.TextEdit{
				Pos:     lex.Pos.Offset,
				End:     lex.Pos.Offset + len(lex.Text) - 1,
				NewText: []byte(expected),
			}
		})
		if err != nil {
			panic(err)
		}
	}
	return false
}
func ( v * rpcNamesUpperCamelCaseVisitor ) VisitRPC ( rpc * parser . RPC ) bool { name := rpc . RPCName if ! strs . IsUpperCamelCase ( name ) { expected := strs . ToUpperCamelCase ( name ) v . AddFailuref ( rpc . Meta . Pos , " " , name , expected ) err := v . Fixer . SearchAndReplace ( rpc . Meta . Pos , func ( lex * lexer . Lexer ) fixer . TextEdit { lex . NextKeyword ( ) lex . Next ( ) return fixer . TextEdit { Pos : lex . Pos . Offset , End : lex . Pos . Offset + len ( lex . Text ) - 1 , NewText : [ ] byte ( expected ) , } } ) if err != nil { panic ( err ) } } return false }
VisitRPC checks the rpc.
VisitRPC checks the rpc .