blob: 119a800d95f7e3ab59ce5e575001c6881caebab9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// SPDX-License-Identifier: AGPL-3.0-only
// SPDX-FileContributor: Runxi Yu <https://runxiyu.org>
package main
import (
"path"
"strings"
)
func first_line(s string) string {
before, _, _ := strings.Cut(s, "\n")
return before
}
func base_name(s string) string {
return path.Base(s)
}
|