this repo has no description
0
fork

Configure Feed

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

cmd/cue/cmd: 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: I00923f428cd24def15907946c58202a58a9f1cdc
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/549297
Unity-Result: CUEcueckoo <cueckoo@cuelang.org>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>

-20
-20
cmd/cue/cmd/flags.go
··· 15 15 package cmd 16 16 17 17 import ( 18 - "github.com/spf13/cobra" 19 18 "github.com/spf13/pflag" 20 19 ) 21 20 ··· 112 111 v, _ := cmd.Flags().GetStringArray(string(f)) 113 112 return v 114 113 } 115 - 116 - type stringFlag struct { 117 - name string 118 - short string 119 - text string 120 - def string 121 - } 122 - 123 - func (f *stringFlag) Add(cmd *cobra.Command) { 124 - cmd.Flags().StringP(f.name, f.short, f.def, f.text) 125 - } 126 - 127 - func (f *stringFlag) String(cmd *Command) string { 128 - v, err := cmd.Flags().GetString(f.name) 129 - if err != nil { 130 - return f.def 131 - } 132 - return v 133 - }