Skip to content

goforge rem:grpc ​

Removes gRPC servers, interceptors, clients, protos, and configuration from a GoForge project (for HTTP-only APIs).

Syntax ​

bash
goforge rem:grpc

What It Removes ​

  • Deletes boot/server/grpc.go, boot/client/grpc_client.go, boot/server/middleware/grpc.go, core/config/grpc.go.
  • Deletes internal/services/*/grpc.go, internal/proto/*, and internal/tests/grpc/*.
  • Patches core/config/config.go, internal/services/*/module.go, boot/kernel.go, and runs go mod tidy.

Post-Command Manual Fixes (goforge-template d666864)

In the current goforge-template release, goforge rem:grpc leaves two references that need manual cleanup to compile:

  1. boot/kernel.go: NewWithConfig / NewApp call buildServers(cfg, db, routers, grpcRegistries) (4 arguments), which rem:grpc does not match when deleting buildServers. Replace those calls with []server.Server{server.NewHTTPServer(cfg, routers, server.WithReadinessCheck(db.Ping))}.
  2. core/config/config.go: Remove the c.GRPC.Port / c.GRPC.TLSEnabled / c.GRPC.TLSCertFile / c.GRPC.TLSKeyFile checks inside AllConfig.Validate().

Released under the Apache-2.0 License.