Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.

Commit 49ab0bd

Browse files
committed
Rename variables and receivers
1 parent ad83279 commit 49ab0bd

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

internals/secrethub/generate.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func (cmd *GenerateSecretCommand) before() error {
8383
return err
8484
}
8585

86-
charset := cmd.charsetFlag.charset
86+
charset := cmd.charsetFlag.v
8787
if useSymbols {
8888
charset = charset.Add(randchar.Symbols)
8989
}
@@ -92,7 +92,7 @@ func (cmd *GenerateSecretCommand) before() error {
9292
return ErrCharsetSizeNonPositive
9393
}
9494

95-
cmd.generator, err = randchar.NewRand(charset, cmd.mins.options...)
95+
cmd.generator, err = randchar.NewRand(charset, cmd.mins.v...)
9696
if err != nil {
9797
return err
9898
}
@@ -202,14 +202,14 @@ func (cmd *GenerateSecretCommand) useSymbols() (bool, error) {
202202
}
203203

204204
type optionsValue struct {
205-
options []randchar.Option
205+
v []randchar.Option
206206
}
207207

208-
func (v *optionsValue) String() string {
208+
func (ov *optionsValue) String() string {
209209
return ""
210210
}
211211

212-
func (v *optionsValue) Set(flagValue string) error {
212+
func (ov *optionsValue) Set(flagValue string) error {
213213
elements := strings.Split(flagValue, ":")
214214
if len(elements) != 2 {
215215
return ErrInvalidMinFlag(flagValue)
@@ -225,35 +225,35 @@ func (v *optionsValue) Set(flagValue string) error {
225225
return ErrCouldNotFindCharSet(elements[0])
226226
}
227227

228-
v.options = append(v.options, randchar.Min(count, charset))
228+
ov.v = append(ov.v, randchar.Min(count, charset))
229229
return nil
230230
}
231231

232-
func (v *optionsValue) IsCumulative() bool {
232+
func (ov *optionsValue) IsCumulative() bool {
233233
return true
234234
}
235235

236236
type charsetValue struct {
237-
charset randchar.Charset
237+
v randchar.Charset
238238
}
239239

240-
func (c *charsetValue) String() string {
240+
func (cv *charsetValue) String() string {
241241
return ""
242242
}
243243

244-
func (c *charsetValue) Set(flagValue string) error {
244+
func (cv *charsetValue) Set(flagValue string) error {
245245
charsetNames := strings.Split(flagValue, ",")
246246
for _, charsetName := range charsetNames {
247247
charset, ok := randchar.CharsetByName(charsetName)
248248
if !ok {
249249
return ErrCouldNotFindCharSet(charsetName)
250250
}
251-
c.charset = c.charset.Add(charset)
251+
cv.v = cv.v.Add(charset)
252252
}
253253
return nil
254254
}
255255

256-
func (c *charsetValue) IsCumulative() bool {
256+
func (cv *charsetValue) IsCumulative() bool {
257257
return true
258258
}
259259

0 commit comments

Comments
 (0)