fix namespace tomfoolery
This commit is contained in:
parent
f43c175c27
commit
48d2e2e102
2 changed files with 5 additions and 5 deletions
10
main.go
10
main.go
|
@ -35,8 +35,8 @@ func writePage(w io.Writer, path string, pkg Package) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func loadConfig() (ret []Package, err error) {
|
func loadConfig(namespace string) (ret []Package, err error) {
|
||||||
content, err := ioutil.ReadFile("packages.json")
|
content, err := ioutil.ReadFile(fmt.Sprintf("%s.json", namespace))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -45,14 +45,14 @@ func loadConfig() (ret []Package, err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
packages, err := loadConfig()
|
namespace := os.Args[1]
|
||||||
|
|
||||||
|
packages, err := loadConfig(namespace)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("%s\n", err)
|
log.Fatalf("%s\n", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace := "pault.ag"
|
|
||||||
|
|
||||||
for _, pkg := range packages {
|
for _, pkg := range packages {
|
||||||
packages := pkg.Packages
|
packages := pkg.Packages
|
||||||
packages = append(packages, "")
|
packages = append(packages, "")
|
||||||
|
|
Loading…
Reference in a new issue