1 2 3 4 5 6 7 8
package main import "strings" func first_line(s string) string { before, _, _ := strings.Cut(s, "\n") return before }