You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I really like the idea of auto-generating documentation, so thanks for creating this project!
However, I cannot generate the documentation, as go generate panics.
I am using caarlos0/env.
I have a few .go files, but for simplicity, all are in package main.
This is config.go:
package main
import (
"errors""time""github.com/caarlos0/env"
)
const (
//Environment values, used for logger configurationEnvironmentProduction="production"
)
// Error messagesvar (
ErrNoRowsFound=errors.New("no rows found")
)
//go:generate envdoc -output environments.mdtypeappconfigstruct {
// Port the application will listen on inside the containerPortint`env:"PORT" envDefault:"8080"`// some more stuff I omitted here
}
func (c*appconfig) ParseEnvVariablesIntoConfigStruct() error {
iferr:=env.Parse(c); err!=nil {
returnerr
}
returnnil
}
I get this error:
panic: expected type node root child, got nodeField ()
When I uncomment the method at the end, I at least get no errors, and the environments.md file is generated, but only contains # Environment Variables, nothing else.
go version is 1.22.2
The text was updated successfully, but these errors were encountered:
Hi, I really like the idea of auto-generating documentation, so thanks for creating this project!
However, I cannot generate the documentation, as go generate panics.
I am using caarlos0/env.
I have a few .go files, but for simplicity, all are in package main.
This is config.go:
I get this error:
panic: expected type node root child, got nodeField ()
When I uncomment the method at the end, I at least get no errors, and the environments.md file is generated, but only contains
# Environment Variables
, nothing else.go version is 1.22.2
The text was updated successfully, but these errors were encountered: