Explorar o código

Merge pull request #187 from grpc/name-casing

Only lower-case the first character of method names in generated clients.
Tim Burks %!s(int64=7) %!d(string=hai) anos
pai
achega
f57b9c3d06
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      Sources/protoc-gen-swiftgrpc/Generator-Names.swift

+ 2 - 1
Sources/protoc-gen-swiftgrpc/Generator-Names.swift

@@ -60,7 +60,8 @@ extension Generator {
   }
 
   internal var methodFunctionName: String {
-    return method.name.lowercased()
+    let name = method.name
+    return name.prefix(1).lowercased() + name.dropFirst()
   }
 
   internal var methodSessionName: String {