genservice

command
v1.45.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Command genservice generates a microservice's boilerplate from its api package definition.go. Given an api package directory it generates client.go; given a service directory (with an <x>api subdirectory) it generates client.go, intermediate.go, mock.go, mock_test.go, and manifest.yaml, and syncs the godoc of each hand-written *Service handler method to its feature's description.

Usage: genservice [-check] <dir> [<dir>...]. Each dir may be a microservice directory or its api package; an api package belonging to a microservice regenerates all five artifacts, so either points at the same result. With -check, nothing is written; the command exits 2 if any output is out of date (a CI guard), 1 on error, 0 when everything is current.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL