Minor cleanups

Aperta
#28 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
67/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
go
Ambito
backend

Direzione di ricerca

Start with converter.go, tt_test.go:405, and converter_test.go:30; compare each listed issue with the surrounding code and tests. Then review the README and CHANGELOG v1.1.0 entries, and check the exported StringToTTConvFactory methods. Done means each listed cleanup is addressed, including the documentation inconsistencies and test assertion/name issues.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

code health

Reproduction snippets assume:

fac := tupleconv.MakeStringToTTConvFactory()
  • StringToBinaryConverter is missing from the interface checks (converter.go:22-38).
  • The comment says replaceSeparators, the function is replaceCharacters (converter.go:81). It also makes one pass per character; a strings.Replacer built once in the constructor would do one.
  • The datetime parameter of DatetimeToStringConverter.Convert shadows the datetime package (converter.go:356).
  • tt_test.go:405: assert.NoError(t, err) checks the outer err left over from uuid.Parse, so it checks nothing.
  • converter_test.go:30: subtest names are built with fmt.Sprintln, so they end with a newline.
  • README "String to any/scalar" doesn't mention array and map for any (and lists interval for scalar, see #13). The Mapper example mixes tabs and spaces.
  • CHANGELOG v1.1.0 says "The release allows to parse any to slices and arrays", while its Fixed section says "GetAnyConverter: don't parse any to slices and arrays".
  • The exported methods of StringToTTConvFactory have no doc comments.
Lingua principale
Go
Stelle
1
Fork
0
Merge medio
1h 43m
PR unite (30g)
2

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di tarantool/go-tupleconv

Tutte le issue di tarantool/go-tupleconv

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.