Clean up Dispenser and filename handling a bit

This commit is contained in:
Matthew Holt 2019-08-21 15:23:00 -06:00
parent 59910923d1
commit 8420a2f250
No known key found for this signature in database
GPG key ID: 2A349DD577D586A5
5 changed files with 33 additions and 47 deletions

View file

@ -308,9 +308,9 @@ func TestDispenser_ArgErr_Err(t *testing.T) {
}
func newTestDispenser(input string) *Dispenser {
tokens, err := allTokens(strings.NewReader(input))
tokens, err := allTokens("Testfile", strings.NewReader(input))
if err != nil && err != io.EOF {
log.Fatalf("getting all tokens from input: %v", err)
}
return NewDispenser("Testfile", tokens)
return NewDispenser(tokens)
}