protoc

package
v0.2.25 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Command = &cobra.Command{
	Use:   "proto-gen",
	Short: "Generates a proto file in the specified language",
	Long: `
	gen files tree:

	├── [$ProtoName]
	│ ├── $ProtoName.proto
	│ ├── $ProtoName.pb.go
	│ ├── $ProtoName_grpc.pb.go
	│ └── metadata.go
	
	for go language:
		using struct custom tag,for example
		
		message Bar {
		  // @cTags: binding:"foo_bar"
		  int64 id = 1; // @cTags: binding:"foo_bar"
		  string in = 2;
		  string out = 3;
		  string create_time = 4;
		}`,
	Example: "neptune proto-gen [$ProtoFilePath] OR proto-gen *.proto OR proto-gen -l java $ProtoFilePath",
	RunE: func(cmd *cobra.Command, args []string) error {
		err := Run(cmd, args)
		if err != nil {
			println(err.Error())
		}
		return err
	},
}

Functions

func Run

func Run(_ *cobra.Command, args []string) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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