lab007

command
v0.0.0-...-f10d331 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: MIT Imports: 5 Imported by: 0

README

测试Enum

注意

  1. 在protobuf中的enum字段要是没数据的话,golang中会用把这个变量赋值为默认值,也就是enum的第一个值
  2. enum可以单独定义,也可以定义在一个message中
  3. allow_alias参数可以设置重复的enum

运行结果

Imgur

参考资料

https://developers.google.com/protocol-buffers/docs/proto3#enum

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package pb is a generated protocol buffer package.
Package pb is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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