More debug output and template fixes
Signed-off-by: jolheiser <john.olheiser@gmail.com>pull/3/head
parent
ab84fdea97
commit
c8b30a9731
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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)),
|
||||
|
|
|
@ -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 -->
|
||||
|
|
|
@ -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>
|
||||
`
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue