diff --git a/flags/flags.go b/flags/flags.go index 19b81c6..767691d 100644 --- a/flags/flags.go +++ b/flags/flags.go @@ -200,5 +200,18 @@ func Before(ctx *cli.Context) error { beaver.Console.Level = beaver.DEBUG } + beaver.Debugf("Port: %d", Port) + beaver.Debugf("Domain: %s", Domain) + beaver.Debugf("Service: %s", Service) + beaver.Debugf("Base URL: %s", baseURL) + beaver.Debugf("Namespace: %s", Namespace) + beaver.Debugf("Include: %s", include.Value()) + beaver.Debugf("Exclude: %s", exclude.Value()) + beaver.Debugf("Private: %t", Private) + beaver.Debugf("Fork: %t", Fork) + beaver.Debugf("Mirror: %t", Mirror) + beaver.Debugf("Archive: %t", Archive) + beaver.Debugf("Override: %s", override.Value()) + beaver.Debugf("Interval: %s", Interval) return nil } diff --git a/router/router.go b/router/router.go index 1928511..2a77243 100644 --- a/router/router.go +++ b/router/router.go @@ -63,6 +63,7 @@ func doVanity(res http.ResponseWriter, req *http.Request) { if err := vanity.Execute(res, map[string]interface{}{ "Package": pkg, + "Module": pkg.Module(flags.Domain), "AppVer": api.Version, "GoVer": runtime.Version(), "GoSource": fmt.Sprintf("%s %s %s %s", pkg.Module(flags.Domain), pkg.CloneHTTP, svc.GoDir(pkg), svc.GoFile(pkg)), diff --git a/router/templates/head.go b/router/templates/head.go index 08ed1a5..9fb8c57 100644 --- a/router/templates/head.go +++ b/router/templates/head.go @@ -11,7 +11,7 @@ var Head = ` - + diff --git a/router/templates/vanity.go b/router/templates/vanity.go index bed416a..8a76d19 100644 --- a/router/templates/vanity.go +++ b/router/templates/vanity.go @@ -6,5 +6,5 @@ var Vanity = `

Name: {{.Package.Name}}

Source: {{.Package.WebURL}}

{{if .Package.Description}}

Description: {{.Package.Description}}

{{end}} -

Documentation: https://pkg.go.dev/{{.Package.Module}}

+

Documentation: https://pkg.go.dev/{{.Module}}

` diff --git a/service/service.go b/service/service.go index 3d7c32e..2934fe8 100644 --- a/service/service.go +++ b/service/service.go @@ -53,7 +53,7 @@ func Check(pkg *api.Package) error { // Exclusions for _, exclude := range flags.Exclude { if exclude.MatchString(pkg.Name) { - return fmt.Errorf("%s is was excluded by the rule %s", pkg.Name, exclude.String()) + return fmt.Errorf("%s was excluded by the rule %s", pkg.Name, exclude.String()) } } @@ -61,10 +61,10 @@ func Check(pkg *api.Package) error { if len(flags.Include) > 0 { for _, include := range flags.Include { if include.MatchString(pkg.Name) { - return fmt.Errorf("%s is was included by the rule %s", pkg.Name, include.String()) + return fmt.Errorf("%s was included by the rule %s", pkg.Name, include.String()) } } - return fmt.Errorf("%s is wasn't included by any existing inclusion rule", pkg.Name) + return fmt.Errorf("%s wasn't included by any existing inclusion rule", pkg.Name) } return nil