go-imap icon indicating copy to clipboard operation
go-imap copied to clipboard

unnecessary conversion

Open tegk opened this issue 5 years ago • 6 comments

response.go:125:35: unnecessary conversion (unconvert)
	fields := []interface{}{RawString(tag)}
read.go:82:38: unnecessary conversion (unconvert)
	nbr, err := strconv.ParseUint(string(s), 10, 32)
status.go:97:49: unnecessary conversion (unconvert)
	if err := w.writeFields([]interface{}{RawString(tag), RawString(r.Type)}); err != nil {

tegk avatar Jun 12 '19 13:06 tegk

response.go:125:35: unnecessary conversion (unconvert)
  fields := []interface{}{RawString(tag)}
status.go:97:49: unnecessary conversion (unconvert)
  if err := w.writeFields([]interface{}{RawString(tag), RawString(r.Type)}); err != nil {

False positives, the type is checked by writeFields (RawString vs string).

foxcpp avatar Jun 12 '19 15:06 foxcpp

@tegk, creating a lot of issues like this without even reading the code isn't really helpful. Please consider sending a single pull request with commits fixing the issues instead.

emersion avatar Jun 12 '19 15:06 emersion

@tegk, creating a lot of issues like this without even reading the code isn't really helpful. Please consider sending a single pull request with commits fixing the issues instead.

I did read the code. Some can be matter of opinion so its worth discussing beforehand. Will try my best to send a pull request. Sorry, I did not intend to upset you!

tegk avatar Jun 12 '19 15:06 tegk

Some can be matter of opinion so its worth discussing beforehand.

One issue would have been enough :P

Will try my best to send a pull request. Sorry, I did not intend to upset you!

Thanks!

emersion avatar Jun 12 '19 15:06 emersion

One issue would have been enough :P

Thanks, I will keep this in mind. The issues are not related to each other from a technical perspective thus seemed the right way to do it.

tegk avatar Jun 12 '19 15:06 tegk

The issues are not related to each other from a technical perspective thus seemed the right way to do it.

Consider this:

  • It feels like spam
  • It's just the raw dump from the linter without any added value
  • It's minor issues

I appreciate the enthusiasm, but still!

emersion avatar Jun 12 '19 15:06 emersion