Skip to content
This repository was archived by the owner on Aug 23, 2021. It is now read-only.

kamiaka/go-partialfields

Repository files navigation

go-partialfields

partialfields is a program for the Go language that checks that the fields of structural literals are partially defined.

 🙅‍♀️ Don't use this.
Use exhaustivestruct

Usage

partialfields [-flag] [package]

Just give the package path.

partialfields github.com/kamiaka/partialfields/testdata/src/a

Control errors

Comment

Skip if the struct literal comment starts with // partial.

type Value struct {
  Foo, Bar int
}

// skip check.
var OK = Value{ // partial
  Foo: 1,
}

// requires Bar.
var NG = Value{
  Foo: 1,
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages