main.go
Function main
has 60 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func main() {
flag.Usage = printUsage
versionPtr := flag.Bool("version", false, "print version of repogen")
pkgPtr := flag.String(
Function getPkgID
has 5 return statements (exceeds 4 allowed). Open
Open
func getPkgID(pattern string) (string, error) {
pkgs, err := packages.Load(nil, pattern)
if err != nil {
return "", err
}
Function generateFromRequest
has 5 return statements (exceeds 4 allowed). Open
Open
func generateFromRequest(request GenerationRequest) (string, error) {
cfg := packages.Config{
Mode: packages.NeedName | packages.NeedTypes,
}
if request.ModelPkg == "" {