exhaustivestruct

module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2020 License: MIT

README

exhaustivestruct

Go Report Card

exhaustivestruct is a go static analysis tool to find structs that have some, but no all, initialized fields.

Installation

go get -u github.com/mbilski/exhaustivestruct/cmd/exhaustivestruct

Usage

exhaustivestruct files/packages

Example

type User struct {
  Name string
  Age int
}

var user = User{ // fails with "Age is missing in User"
  Name: "John",
}

var user2 = User{} // ignores empty structs

Directories

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

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