Implement GCP Cloud Function

This commit is contained in:
Ray Miller 2023-10-08 14:25:57 +01:00
parent 794b873ddd
commit 15d4b66afa
13 changed files with 242686 additions and 38 deletions

25
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)
}
}