コード例 #1
0
ファイル: help.go プロジェクト: creativeprogramming/drive
func formatText(text string) []string {
	splits := strings.Split(text, "\n")

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

	return pr.Format()
}
コード例 #2
0
ファイル: main.go プロジェクト: odeke-em/pretty-words
func main() {
	pr := prettywords.PrettyRubric{
		Limit: 80,
	}

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