pregen.go raw

   1  // Package main is a generator for the base10000 (4 digit) encoding of the ints
   2  // library.
   3  package main
   4  
   5  import (
   6  	"fmt"
   7  	"os"
   8  
   9  	"next.orly.dev/pkg/lol/chk"
  10  )
  11  
  12  func main() {
  13  	fh, err := os.Create("pkg/ints/base10k.txt")
  14  	if chk.E(err) {
  15  		panic(err)
  16  	}
  17  	for i := range 10000 {
  18  		fmt.Fprintf(fh, "%04d", i)
  19  	}
  20  }
  21