mirror of
https://github.com/buger/goreplay.git
synced 2024-04-21 12:32:02 +00:00
All flags that expect buffer as input i.e. `--output-file-size-limit`, `--output-file-max-size-limit`, `--copy-buffer-size` and `input-raw-buffer-size` can now parse inputs from differents bases and data units like: `10mb`, `10kb`, `100gb`, `18tb`, `11839023`.... data units and bases are case insensitive, the parser accepts only the format of [Go integer literals](https://golang.org/ref/spec#Integer_literals)
19 lines
345 B
Go
19 lines
345 B
Go
package main
|
|
|
|
// NullOutput used for debugging, prints nothing
|
|
type NullOutput struct {
|
|
}
|
|
|
|
// NewNullOutput constructor for NullOutput
|
|
func NewNullOutput() (o *NullOutput) {
|
|
return new(NullOutput)
|
|
}
|
|
|
|
func (o *NullOutput) Write(data []byte) (int, error) {
|
|
return len(data), nil
|
|
}
|
|
|
|
func (o *NullOutput) String() string {
|
|
return "Null Output"
|
|
}
|