this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

internal/diff: remove unused code

When refactoring cue/load, I noticed that some pieces of code
were unused, which makes it less obvious what kinds of things
can be done. I used `staticcheck` to point out many other
places in the code that are unused.

This is one of those places. I feel it's better to remove this code
even if it might be used in the future (it's always there to be found
in the git history).

Signed-off-by: Roger Peppe <rogpeppe@gmail.com>
Change-Id: Id9f42d6ba8f77c9098986a2e72f041f86f0db05b
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/549289
Unity-Result: CUEcueckoo <cueckoo@cuelang.org>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>

+1 -12
+1 -4
internal/diff/diff.go
··· 16 16 17 17 import ( 18 18 "cuelang.org/go/cue" 19 - "cuelang.org/go/cue/errors" 20 19 ) 21 20 22 21 // Profile configures a diff operation. ··· 165 164 func (e Edit) YPos() int { return int(e.yPos - 1) } 166 165 167 166 type differ struct { 168 - cfg Profile 169 - options []cue.Option 170 - errs errors.Error 167 + cfg Profile 171 168 } 172 169 173 170 func (d *differ) diffValue(x, y cue.Value) (Kind, *EditScript) {
-8
internal/diff/print.go
··· 75 75 return len(b), nil 76 76 } 77 77 78 - func (p *printer) write(b []byte) { 79 - _, _ = p.Write(b) 80 - } 81 - 82 - func (p *printer) printLen(align int, str string) { 83 - fmt.Fprintf(p, "% -[1]*s", align, str) 84 - } 85 - 86 78 func (p *printer) println(s string) { 87 79 fmt.Fprintln(p, s) 88 80 }