Skip to content

v1.3.0: trailing comments, @gotags field & more

Compare
Choose a tag to compare
@lrstanley lrstanley released this 17 Aug 00:30
· 13 commits to master since this release

Release highlights:

Added support for trailing comments (comments that follow a field, rather than being above the field):

// file: test.proto
syntax = "proto3";

package pb;
option go_package = "/pb";

message IP {
  string Address = 1; // @gotags: valid:"ip"
  string MAC = 2;     // @gotags: validate:"omitempty"
}

New format for specifying a list of tags to be added:

// file: test.proto
syntax = "proto3";

package pb;
option go_package = "/pb";

message IP {
  // @gotags: valid:"ip"
  string Address = 1;

  // Or:
  string MAC = 2; // @gotags: validate:"omitempty"
}

Deprecations

Some previous cli flags and tags have been marked as deprecated. To see more, check out the README.


For a full list of changes, see here.