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

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

	return pr.Format()
}
Beispiel #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"))
}