forked from tslocum/godoc-static
Only include builtin by default when no packages are supplied
parent
cc6c933552
commit
c58e40c51d
21
main.go
21
main.go
|
@ -295,19 +295,18 @@ func run() error {
|
|||
}
|
||||
|
||||
pkgs = strings.Split(strings.TrimSpace(buf.String()), "\n")
|
||||
}
|
||||
|
||||
// Always include the 'builtin' package as well, if not already present.
|
||||
// It's to ensure that the links to types such as string, int, bool, any, etc. are accessible.
|
||||
hasBuiltin := false
|
||||
for _, pkg := range pkgs {
|
||||
if pkg == "builtin" {
|
||||
hasBuiltin = true
|
||||
break
|
||||
// Include the 'builtin' package as well, if not already present.
|
||||
hasBuiltin := false
|
||||
for _, pkg := range pkgs {
|
||||
if pkg == "builtin" {
|
||||
hasBuiltin = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !hasBuiltin {
|
||||
pkgs = append(pkgs, "builtin")
|
||||
}
|
||||
}
|
||||
if !hasBuiltin {
|
||||
pkgs = append(pkgs, "builtin")
|
||||
}
|
||||
|
||||
var newPkgs []string
|
||||
|
|
Loading…
Reference in New Issue