summaryrefslogtreecommitdiff
path: root/radix_info.go
blob: afcc5b20d235c3d8587b439ca367f6e34754a61e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package main

import (
	"fmt"
	"os"
)

func main() {
	args, err := parseArgs()
	if args.Exit {
		return
	}

	if err == nil {
		factorInfo := getFactorInfo(args.Radix, args.FullMap, args.LargeCalc)
		if args.Compact {
			factorInfo.writeToCompact(os.Stdout)
		} else {
			factorInfo.writeTo(os.Stdout)
		}
	} else {
		fmt.Fprintln(os.Stderr, err)
	}
}