Refactor to move cloud fn to top level

This commit is contained in:
Ray Miller 2023-10-08 15:05:12 +01:00
parent 28abf0e461
commit 3559ca9ec1
14 changed files with 14 additions and 13 deletions

25
cmd/fix-wordlist/main.go Normal file
View file

@ -0,0 +1,25 @@
package main
import (
"bufio"
"fmt"
"log"
"os"
"strings"
"golang.org/x/text/encoding/charmap"
)
func main() {
dec := charmap.ISO8859_1.NewDecoder()
sc := bufio.NewScanner(dec.Reader(os.Stdin))
for sc.Scan() {
s := strings.TrimSpace(sc.Text())
if len(s) > 0 {
fmt.Println(s)
}
}
if err := sc.Err(); err != nil {
log.Fatal(err)
}
}