Skip to content

Commit 1a21831

Browse files
committed
Rename a struct
1 parent d2d2a89 commit 1a21831

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

hooks/jsonnet-fmt-hook/main.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ type CmdResult struct {
2626
err error
2727
}
2828

29-
type Diff struct {
29+
type FileDiff struct {
3030
text string
3131
numInsert int
3232
numDelete int
@@ -35,7 +35,7 @@ type Diff struct {
3535
type FmtError struct {
3636
path string
3737
args []string
38-
diff *Diff
38+
diff *FileDiff
3939
exitCode int
4040
stderr string
4141
}
@@ -63,11 +63,11 @@ func hasTestOpt(opts []string) bool {
6363
return false
6464
}
6565

66-
func summarizeDiff(diffs []diffmatchpatch.Diff) *Diff {
66+
func summarizeDiff(diffs []diffmatchpatch.Diff) *FileDiff {
6767
var builder strings.Builder
6868
var err error
6969
var lastLineBreak bool
70-
var fileDiff Diff
70+
var fileDiff FileDiff
7171

7272
writeString := func(builder *strings.Builder, s string) {
7373
_, err = builder.WriteString(s)
@@ -135,7 +135,7 @@ func summarizeDiff(diffs []diffmatchpatch.Diff) *Diff {
135135
return &fileDiff
136136
}
137137

138-
func diffJsonnetFmt(f string) (*Diff, error) {
138+
func diffJsonnetFmt(f string) (*FileDiff, error) {
139139
var stdout, stderr bytes.Buffer
140140

141141
cmd := execabs.Command(jsonnetFmtCmd, f)

0 commit comments

Comments
 (0)