/switch-const-test

Simple golang unit test to test that switches contain all consts in a file

Primary LanguageGoMIT LicenseMIT

switch-const-test

This is an example of how to use go/ast and go/parser to inspect a switch statement.

Admittedly hacky :-) but it gets the job done.