diff options
author | Özgür Kesim <oec@codeblau.de> | 2024-12-08 23:40:09 +0100 |
---|---|---|
committer | Özgür Kesim <oec@codeblau.de> | 2024-12-08 23:40:09 +0100 |
commit | ba4c34b5921ca3d7888e20856c0e778186fab421 (patch) | |
tree | c7725c2ee9031bb5e1ece9bd418be0570052b225 /uncrust.go | |
parent | 7511c09c313f08126a1962e879bc791e89c7aa26 (diff) |
better verbose output
Diffstat (limited to 'uncrust.go')
-rw-r--r-- | uncrust.go | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -56,11 +56,12 @@ func main() { cmd.Stdout = stdout cmd.Stderr = stderr + samfile = filepath.Base(samfile) + if e = cmd.Run(); e != nil { if _, ok := e.(*exec.ExitError); ok { str := stderr.String() if len(samfile) != 0 { - samfile = "./" + filepath.Base(samfile) str = strings.ReplaceAll(str, "stdin, open_line is ", samfile+":") str = pos_rx.ReplaceAllString(str, fmt.Sprintf("%s:$1:#$2", samfile)) } @@ -117,7 +118,7 @@ func main() { func pretty(e []textdiff.Edit, p string) string { b := &bytes.Buffer{} for _, e := range e { - fmt.Fprintf(b, "%s:#%d,#%d\n", p, e.Start, e.End) + fmt.Fprintf(b, "%s:#%d,#%d: »%s«\n", p, e.Start, e.End, e.New) } return b.String() } |