goto is idiomatic in C for cleanup and error handling as long it is a jump to the end of the function.  It allows the following code to be shared

```
found:
    token->str = tokenizer->cursor;
    token->length = cursor - tokenizer->cursor;
    tokenizer->cursor += token->length;
    tokenizer->length -= token->length;
}
```