()
| 10 | const headFile = ".super_head" |
| 11 | |
| 12 | func headPath() string { |
| 13 | dir := os.Getenv("SUPER_HEAD_DIR") |
| 14 | if dir == "" { |
| 15 | dir, _ = os.UserHomeDir() |
| 16 | } |
| 17 | if dir == "." { |
| 18 | dir = "" |
| 19 | } |
| 20 | return filepath.Join(dir, headFile) |
| 21 | } |
| 22 | |
| 23 | func readHead() (string, error) { |
| 24 | b, err := os.ReadFile(headPath()) |