-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: skip function declarations for ast parser
Skip `FuncDect` because funcs may declare fields inside it, where fields could be handled as a part of current type. Fix: #28
- Loading branch information
Showing
3 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package testdata | ||
|
||
// Test case for #21 where the envdoc panics if target type function presents. | ||
|
||
//go:generate envdoc -output test.md --all | ||
type aconfig struct { | ||
// this is some value | ||
somevalue string `env:"SOME_VALUE" envDefault:"somevalue"` | ||
} | ||
|
||
// when this function is present, go generate panics with "expected type node root child, got nodeField ()". | ||
func someFuncThatTakesInput(configs ...interface{}) { | ||
// this is some comment | ||
} | ||
|
||
func (a *aconfig) someFuncThatTakesInput(configs ...interface{}) { | ||
// this is some comment | ||
} |