(reg *descriptor.Registry)
| 126 | } |
| 127 | |
| 128 | func applyFlags(reg *descriptor.Registry) error { |
| 129 | if *grpcAPIConfiguration != "" { |
| 130 | if err := reg.LoadGrpcAPIServiceFromYAML(*grpcAPIConfiguration); err != nil { |
| 131 | return err |
| 132 | } |
| 133 | } |
| 134 | if *warnOnUnboundMethods && *generateUnboundMethods { |
| 135 | grpclog.Warningf("Option warn_on_unbound_methods has no effect when generate_unbound_methods is used.") |
| 136 | } |
| 137 | reg.SetStandalone(*standalone) |
| 138 | reg.SetAllowDeleteBody(*allowDeleteBody) |
| 139 | |
| 140 | flag.Visit(func(f *flag.Flag) { |
| 141 | if f.Name == "allow_repeated_fields_in_body" { |
| 142 | grpclog.Warning("The `allow_repeated_fields_in_body` flag is deprecated and will always behave as `true`.") |
| 143 | } |
| 144 | }) |
| 145 | |
| 146 | reg.SetOmitPackageDoc(*omitPackageDoc) |
| 147 | reg.SetWarnOnUnboundMethods(*warnOnUnboundMethods) |
| 148 | reg.SetGenerateUnboundMethods(*generateUnboundMethods) |
| 149 | return reg.SetRepeatedPathParamSeparator(*repeatedPathParamSeparator) |
| 150 | } |
no test coverage detected