Example #1
0
func formatText(text string) []string {
	splits := strings.Split(text, "\n")

	pr := prettywords.PrettyRubric{
		Limit: 80,
		Body:  splits,
	}

	return pr.Format()
}
Example #2
0
func main() {
	pr := prettywords.PrettyRubric{
		Limit: 80,
	}

	rest := os.Args[1:]
	pr.Body = rest
	formatted := pr.Format()
	fmt.Println(strings.Join(formatted, "\n"))
}