Skip to content

Scaffolder: Prevent having pointer field for a type that has a custom type fields #1616

@lumtis

Description

@lumtis

When scaffolding a type with a custom type field:

starport s type foo
starport s map bar foo:Foo 

The foo field will be a pointer.
We should use the [(gogoproto.nullable) = false] option in proto field to avoid having a pointer

Generating

message Bar {
  string index = 1; 
  Foo foo = 2 [(gogoproto.nullable) = false];
}

Metadata

Metadata

Assignees

Labels

component:scaffoldFeature, enhancement, or refactor related to scaffolding.type:enhImprovement or update to existing feature(s).

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions