util

package
v0.8.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2025 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTableWriter

func GetTableWriter() table.Writer

func StreamFileFromGzip

func StreamFileFromGzip(reader io.Reader, filename string) (io.Reader, error)

StreamFileFromGzip creates a new streamer for a specific file in a tar.gz

Types

type FileWriter

type FileWriter interface {
	Create(filename string) (*os.File, error)
}

type FilesystemWriter

type FilesystemWriter struct{}

func NewFilesystemWriter

func NewFilesystemWriter() *FilesystemWriter

func (*FilesystemWriter) Create

func (fs *FilesystemWriter) Create(filename string) (*os.File, error)

type MockFileWriter

type MockFileWriter struct {
	mock.Mock
}

MockFileWriter is an autogenerated mock type for the FileWriter type

func NewMockFileWriter

func NewMockFileWriter(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockFileWriter

NewMockFileWriter creates a new instance of MockFileWriter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockFileWriter) Create

func (_mock *MockFileWriter) Create(filename string) (*os.File, error)

Create provides a mock function for the type MockFileWriter

func (*MockFileWriter) EXPECT

type MockFileWriter_Create_Call

type MockFileWriter_Create_Call struct {
	*mock.Call
}

MockFileWriter_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create'

func (*MockFileWriter_Create_Call) Return

func (*MockFileWriter_Create_Call) Run

func (_c *MockFileWriter_Create_Call) Run(run func(filename string)) *MockFileWriter_Create_Call

func (*MockFileWriter_Create_Call) RunAndReturn

func (_c *MockFileWriter_Create_Call) RunAndReturn(run func(filename string) (*os.File, error)) *MockFileWriter_Create_Call

type MockFileWriter_Expecter

type MockFileWriter_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockFileWriter_Expecter) Create

func (_e *MockFileWriter_Expecter) Create(filename interface{}) *MockFileWriter_Create_Call

Create is a helper method to define mock.On call

  • filename

type MockTableWriter

type MockTableWriter struct {
	mock.Mock
}

MockTableWriter is an autogenerated mock type for the TableWriter type

func NewMockTableWriter

func NewMockTableWriter(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockTableWriter

NewMockTableWriter creates a new instance of MockTableWriter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockTableWriter) AppendHeader

func (_mock *MockTableWriter) AppendHeader(row table.Row, configs ...table.RowConfig)

AppendHeader provides a mock function for the type MockTableWriter

func (*MockTableWriter) AppendRow

func (_mock *MockTableWriter) AppendRow(row table.Row, configs ...table.RowConfig)

AppendRow provides a mock function for the type MockTableWriter

func (*MockTableWriter) EXPECT

func (*MockTableWriter) Render

func (_mock *MockTableWriter) Render() string

Render provides a mock function for the type MockTableWriter

type MockTableWriter_AppendHeader_Call

type MockTableWriter_AppendHeader_Call struct {
	*mock.Call
}

MockTableWriter_AppendHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AppendHeader'

func (*MockTableWriter_AppendHeader_Call) Return

func (*MockTableWriter_AppendHeader_Call) Run

func (*MockTableWriter_AppendHeader_Call) RunAndReturn

func (_c *MockTableWriter_AppendHeader_Call) RunAndReturn(run func(row table.Row, configs ...table.RowConfig)) *MockTableWriter_AppendHeader_Call

type MockTableWriter_AppendRow_Call

type MockTableWriter_AppendRow_Call struct {
	*mock.Call
}

MockTableWriter_AppendRow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AppendRow'

func (*MockTableWriter_AppendRow_Call) Return

func (*MockTableWriter_AppendRow_Call) Run

func (*MockTableWriter_AppendRow_Call) RunAndReturn

func (_c *MockTableWriter_AppendRow_Call) RunAndReturn(run func(row table.Row, configs ...table.RowConfig)) *MockTableWriter_AppendRow_Call

type MockTableWriter_Expecter

type MockTableWriter_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockTableWriter_Expecter) AppendHeader

func (_e *MockTableWriter_Expecter) AppendHeader(row interface{}, configs ...interface{}) *MockTableWriter_AppendHeader_Call

AppendHeader is a helper method to define mock.On call

  • row
  • configs

func (*MockTableWriter_Expecter) AppendRow

func (_e *MockTableWriter_Expecter) AppendRow(row interface{}, configs ...interface{}) *MockTableWriter_AppendRow_Call

AppendRow is a helper method to define mock.On call

  • row
  • configs

func (*MockTableWriter_Expecter) Render

Render is a helper method to define mock.On call

type MockTableWriter_Render_Call

type MockTableWriter_Render_Call struct {
	*mock.Call
}

MockTableWriter_Render_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Render'

func (*MockTableWriter_Render_Call) Return

func (*MockTableWriter_Render_Call) Run

func (*MockTableWriter_Render_Call) RunAndReturn

func (_c *MockTableWriter_Render_Call) RunAndReturn(run func() string) *MockTableWriter_Render_Call

type TableWriter

type TableWriter interface {
	AppendHeader(row table.Row, configs ...table.RowConfig)
	AppendRow(row table.Row, configs ...table.RowConfig)
	Render() string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL