More debug output and template fixes

Signed-off-by: jolheiser <john.olheiser@gmail.com>
pull/3/head
jolheiser 2020-09-11 22:21:34 -05:00
parent ab84fdea97
commit c8b30a9731
Signed by: jolheiser
GPG Key ID: B853ADA5DA7BBF7A
5 changed files with 19 additions and 5 deletions

View File

@ -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
}

View File

@ -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)),

View File

@ -11,7 +11,7 @@ var Head = `
<meta name="og:description" content="{{.Package.Description}}"/>
<!-- Go -->
<meta name="go-import" content="{{.Package.Module}} git {{.Package.CloneHTTP}}"/>
<meta name="go-import" content="{{.Module}} git {{.Package.CloneHTTP}}"/>
<meta name="go-source" content="{{.GoSource}}">
<!-- Git Import -->

View File

@ -6,5 +6,5 @@ var Vanity = `
<p><strong>Name: </strong>{{.Package.Name}}</p>
<p><strong>Source: </strong><a href="{{.Package.WebURL}}">{{.Package.WebURL}}</a></p>
{{if .Package.Description}}<p><strong>Description: </strong>{{.Package.Description}}</p>{{end}}
<p><strong>Documentation: <a href="https://pkg.go.dev/{{.Package.Module}}">https://pkg.go.dev/{{.Package.Module}}</a></strong></p>
<p><strong>Documentation: <a href="https://pkg.go.dev/{{.Module}}">https://pkg.go.dev/{{.Module}}</a></strong></p>
`

View File

@ -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