Showing 1 of 1 files from the diff.

@@ -99,14 +99,15 @@
Loading
99 99
	case 1:
100 100
		c.ResultText(filename)
101 101
	case 2:
102 -
		_, additions, err := countChanges(h)
102 +
		additions, _, err := countChanges(h)
103 +
		fmt.Print(h, "\n")
103 104
		if err != nil {
104 105
			return err
105 106
		}
106 107
107 108
		c.ResultInt(additions)
108 109
	case 3:
109 -
		deletions, _, err := countChanges(h)
110 +
		_, deletions, err := countChanges(h)
110 111
		if err != nil {
111 112
			return err
112 113
		}
@@ -117,7 +118,7 @@
Loading
117 118
	return nil
118 119
}
119 120
120 -
func countChanges(h string) (del int, ins int, err error) {
121 +
func countChanges(h string) (ins int, del int, err error) {
121 122
	additions := 0
122 123
	deletions := 0
123 124
	fileLines := strings.Split(h, "\n")
@@ -183,7 +184,7 @@
Loading
183 184
		fmt.Println(err)
184 185
		return nil
185 186
	}
186 -
	diff, err := vc.repo.DiffTreeToTree(oldTree, tree, &defaults)
187 +
	diff, err := vc.repo.DiffTreeToTree(tree, oldTree, &defaults)
187 188
	if err != nil {
188 189
		fmt.Println(err)
189 190
		return nil
@@ -254,7 +255,7 @@
Loading
254 255
		fmt.Println(err)
255 256
		return nil
256 257
	}
257 -
	diff, err := vc.repo.DiffTreeToTree(oldTree, tree, &defaults)
258 +
	diff, err := vc.repo.DiffTreeToTree(tree, oldTree, &defaults)
258 259
	if err != nil {
259 260
		fmt.Println(err)
260 261
		return nil
Files Coverage
pkg 56.61%
Project Totals (10 files) 56.61%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading