Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite305cfe

Browse files
author
Nick Galbreath
committed
cleanups
1 parent4f74a55 commite305cfe

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

‎sources/foldoc/download.go‎renamed to ‎sources/foldoc/main.go‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package main
22

33
import (
44
"bufio"
5+
"flags"
56
"log"
67
"net/http"
78
"os"
@@ -26,6 +27,9 @@ var knownBad = map[string]bool{
2627
}
2728

2829
funcmain() {
30+
outfile:=flag.String("out","words.txt","outfile name")
31+
flags.Parse()
32+
2933
// unique word list
3034
uniques:=make(map[string]bool)
3135

@@ -62,13 +66,13 @@ func main() {
6266
}
6367
sort.Strings(keys)
6468

65-
fo,err:=os.Create("words-foldoc.txt")
69+
fo,err:=os.Create(*outfile)
6670
iferr!=nil {
6771
log.Fatalf("Unable to create output: %s",err)
6872
}
6973
for_,k:=rangekeys {
7074
fo.Write([]byte(k+"\n"))
7175
}
7276
fo.Close()
73-
log.Printf("Wrote %s","words-foldoc.txt")
77+
log.Printf("Wrote %s",*outfile)
7478
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp