From 6488f3d77cf9c357c3b896e16f1bd4b121ea03ec Mon Sep 17 00:00:00 2001 From: Mark McGranaghan Date: Sun, 23 Sep 2012 13:10:54 -0700 Subject: [PATCH] wait for it --- tool/renumber.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tool/renumber.go b/tool/renumber.go index 6ae0321..4956bce 100644 --- a/tool/renumber.go +++ b/tool/renumber.go @@ -25,7 +25,7 @@ func main() { sourceMap := make(map[string]string) fileInfos, dirErr := ioutil.ReadDir("./") if dirErr != nil { panic(dirErr) } - baseTrimmer, _ := regexp.Compile("([0-9x]+-)|(.go)") + baseTrimmer, _ := regexp.Compile("[0-9x]+-") for _, fi := range fileInfos { baseName := baseTrimmer.ReplaceAllString(fi.Name(), "") if baseName != ".git" && baseName != "tool" && baseName != "README.md" { @@ -52,7 +52,7 @@ func main() { // rename some stuff for index, indexName := range indexNames { oldName := sourceMap[indexName] - newName := fmt.Sprintf("%03d-%s.go", index+1, indexName) + newName := fmt.Sprintf("%03d-%s", index+1, indexName) if oldName != newName { os.Rename(oldName, newName) }