mirror of
https://github.com/Slug-Boi/cocommit.git
synced 2026-05-13 12:45:47 +00:00
fix: fixed output of users command to be readable
This commit is contained in:
@@ -1,3 +0,0 @@
|
|||||||
syntax for the test file
|
|
||||||
au|August|August-Brandt|augustbrandt170@gmail.com
|
|
||||||
al|Alex|Alex-itu|lolk@itu.dk
|
|
||||||
@@ -14,7 +14,7 @@ import (
|
|||||||
|
|
||||||
//TODO: MAybe change away from glamour if the weird email issue can't be solved
|
//TODO: MAybe change away from glamour if the weird email issue can't be solved
|
||||||
|
|
||||||
var content string
|
var content string
|
||||||
|
|
||||||
var helpStyle_us = lipgloss.NewStyle().Foreground(lipgloss.Color("241")).Render
|
var helpStyle_us = lipgloss.NewStyle().Foreground(lipgloss.Color("241")).Render
|
||||||
|
|
||||||
@@ -85,11 +85,15 @@ func Entry_US(author_file string) {
|
|||||||
|
|
||||||
scanner := bufio.NewScanner(file)
|
scanner := bufio.NewScanner(file)
|
||||||
var cnt strings.Builder
|
var cnt strings.Builder
|
||||||
|
|
||||||
for scanner.Scan() {
|
|
||||||
cnt.WriteString(scanner.Text() + "\n")
|
|
||||||
}
|
|
||||||
|
|
||||||
|
scanner.Scan()
|
||||||
|
header := scanner.Text()
|
||||||
|
cnt.WriteString(header + "\n")
|
||||||
|
|
||||||
|
for scanner.Scan() {
|
||||||
|
//very hacky it basically just ensure glamour doesn't format the email
|
||||||
|
cnt.WriteString(":\b" + scanner.Text() + "\n")
|
||||||
|
}
|
||||||
|
|
||||||
content = cnt.String()
|
content = cnt.String()
|
||||||
|
|
||||||
@@ -103,4 +107,4 @@ func Entry_US(author_file string) {
|
|||||||
fmt.Println("Bummer, there's been an error:", err)
|
fmt.Println("Bummer, there's been an error:", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user