asciichgolangpublic

package module
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

README

asciichgolangpublic

This module helps to write infrastructure and/or automation related microservices and CLIs easier and faster. By providing a lot of convenience functions, sanity checks during runtime and detailed error messages it can be used to write easy to understand software to automate repeatable work. The focus is on ease of use and developer speed instead of algorithm speed and computer resource efficiency.

Logging

To provide easy readable CLI output its recommended to use the provided logging functions:

package main

import "github.com/asciich/asciichgolangpublic"

func main() {
	asciichgolangpublic.LogInfo("Shown without additional color.")
	asciichgolangpublic.LogInfof("Shown without additional color. %s", "Also available with formatting.")

	asciichgolangpublic.LogGood("Good messages are green.")
	asciichgolangpublic.LogGoodf("Good messages are green. %s", "Also available with formatting.")

	asciichgolangpublic.LogChanged("Changes are purple.")
	asciichgolangpublic.LogChangedf("Changes are purple. %s", "Also available with formatting.")

	asciichgolangpublic.LogWarn("Warnings are yellow.")
	asciichgolangpublic.LogWarnf("Warnings are yellow. %s", "Also available with formatting.")

	asciichgolangpublic.LogError("Errors are red.")
	asciichgolangpublic.LogErrorf("Errors are red. %s", "Also available with formatting.")

	asciichgolangpublic.LogFatalf("Fatal will exit with a red error message and exit code %d", 1)
}

Output produced by this example code:

Errors

It's recommended to use TracedError whenever an error occurs with a custom error message. Error wrapping by directly passing errors or using the %w format string in TracedErrorf is supported. TracedErrors give you a nice debug output including the stack trace in a human readable form compatiple to VSCode (affected sources can directly be opened from Terminal).

Example usage:

func inThisFunctionSomethingGoesWrong() (err error) {
    return asciichgolangpublic.TracedError("This is an error message") // Use TracedErrors when an error occures.
}

err = inThisFunctionSomethingGoesWrong()
asciichgolangpublic.Errors().IsTracedError(err) // returns true for all TracedErrors.
asciichgolangpublic.Errors().IsTracedError(fmt.Errorf("another error")) // returns false for all non TracedErrors.

err.Error() // includes the error message and the stack trace as human readable text.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFileBaseParentNotSet = errors.New("parent is not set")
View Source
var ErrTracedError = errors.New("asciichgolangpublic TracedError base")
View Source
var ErrTracedErrorEmptyString = errors.New("asciichgolangpublic TracedError empty string")
View Source
var ErrTracedErrorNil = errors.New("asciichgolangpublic TracedError nil")
View Source
var ErrTracedErrorNotImplemented = errors.New("asciichgolangpublic TracedError not implemented")

Functions

func Log

func Log(logmessage string)

func LogBold

func LogBold(logmessage string)

func LogChanged

func LogChanged(logmessage string)

func LogChangedf

func LogChangedf(logmessage string, args ...interface{})

func LogError

func LogError(logmessage string)

func LogErrorf

func LogErrorf(logmessage string, args ...interface{})

func LogFatal

func LogFatal(logmessage string)

func LogFatalWithTrace

func LogFatalWithTrace(errorMessageOrError interface{})

func LogFatalWithTracef

func LogFatalWithTracef(logmessage string, args ...interface{})

func LogFatalf

func LogFatalf(logmessage string, args ...interface{})

func LogGoError

func LogGoError(err error)

func LogGoErrorFatal

func LogGoErrorFatal(err error)

func LogGoErrorFatalWithTrace

func LogGoErrorFatalWithTrace(err error)

func LogGood

func LogGood(logmessage string)

func LogGoodf

func LogGoodf(logmessage string, args ...interface{})

func LogInfo

func LogInfo(logmessage string)

func LogInfof

func LogInfof(logmessage string, args ...interface{})

func LogTurnOfColorOutput added in v0.7.1

func LogTurnOfColorOutput()

func LogTurnOnColorOutput added in v0.7.1

func LogTurnOnColorOutput()

func LogWarn

func LogWarn(logmessage string)

func LogWarnf

func LogWarnf(logmessage string, args ...interface{})

func MustFormatAsTestname

func MustFormatAsTestname(objectToFormat interface{}) (testname string)

func TracedError

func TracedError(errorMessageOrError interface{}) (tracedError error)

Create a new error with given error or error message. TracedErrors extends the error message by a human readable stack trace.

func TracedErrorEmptyString

func TracedErrorEmptyString(stringVarName string, errorToUnwrap ...error) (tracedError error)

func TracedErrorNil

func TracedErrorNil(nilVarName string) (tracedError error)

func TracedErrorNilf

func TracedErrorNilf(formatString string, args ...interface{}) (tracedError error)

func TracedErrorNotImplemented

func TracedErrorNotImplemented() (tracedError error)

func TracedErrorf

func TracedErrorf(formatString string, args ...interface{}) (tracedError error)

Create a new error with given error or error message. TracedErrors extends the error message by a human readable stack trace. Error wrapping using '%w' in format string is supported.

Types

type BashService added in v0.4.0

type BashService struct {
	CommandExecutorBase
}

func Bash added in v0.4.0

func Bash() (b *BashService)

func NewBashService added in v0.4.0

func NewBashService() (b *BashService)

func (*BashService) MustRunCommand added in v0.4.0

func (b *BashService) MustRunCommand(options *RunCommandOptions) (commandOutput *CommandOutput)

func (*BashService) MustRunOneLiner added in v0.10.0

func (b *BashService) MustRunOneLiner(oneLiner string, verbose bool) (output *CommandOutput)

func (*BashService) MustRunOneLinerAndGetStdoutAsString added in v0.10.0

func (b *BashService) MustRunOneLinerAndGetStdoutAsString(oneLiner string, verbose bool) (stdout string)

func (*BashService) RunCommand added in v0.4.0

func (b *BashService) RunCommand(options *RunCommandOptions) (commandOutput *CommandOutput, err error)

func (*BashService) RunOneLiner added in v0.10.0

func (b *BashService) RunOneLiner(oneLiner string, verbose bool) (output *CommandOutput, err error)

func (*BashService) RunOneLinerAndGetStdoutAsString added in v0.10.0

func (b *BashService) RunOneLinerAndGetStdoutAsString(oneLiner string, verbose bool) (stdout string, err error)

type ChecksumsService added in v0.1.4

type ChecksumsService struct {
}

func Checksums added in v0.1.4

func Checksums() (checksums *ChecksumsService)

func NewChecksumsService added in v0.1.4

func NewChecksumsService() (c *ChecksumsService)

func (*ChecksumsService) GetSha256SumFromBytes added in v0.14.4

func (c *ChecksumsService) GetSha256SumFromBytes(bytesToHash []byte) (checksum string)

func (*ChecksumsService) GetSha256SumFromString added in v0.1.4

func (c *ChecksumsService) GetSha256SumFromString(stringToHash string) (checksum string)

type CommandExecutor added in v0.4.0

type CommandExecutor interface {
	RunCommand(options *RunCommandOptions) (commandOutput *CommandOutput, err error)
	MustRunCommand(options *RunCommandOptions) (commandOutput *CommandOutput)

	// These Commands can be implemented by embedding the `CommandExecutorBase` struct:
	MustRunCommandAndGetStdoutAsBytes(options *RunCommandOptions) (stdout []byte)
	MustRunCommandAndGetStdoutAsFloat64(options *RunCommandOptions) (stdout float64)
	MustRunCommandAndGetStdoutAsLines(options *RunCommandOptions) (stdoutLines []string)
	MustRunCommandAndGetStdoutAsString(options *RunCommandOptions) (stdout string)
	RunCommandAndGetStdoutAsBytes(options *RunCommandOptions) (stdout []byte, err error)
	RunCommandAndGetStdoutAsFloat64(options *RunCommandOptions) (stdout float64, err error)
	RunCommandAndGetStdoutAsLines(options *RunCommandOptions) (stdoutLines []string, err error)
	RunCommandAndGetStdoutAsString(options *RunCommandOptions) (stdout string, err error)
}

A CommandExecutor is able to run a command like Exec or bash.

type CommandExecutorBase added in v0.4.0

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

func NewCommandExecutorBase added in v0.4.0

func NewCommandExecutorBase() (c *CommandExecutorBase)

func (*CommandExecutorBase) GetParentCommandExecutorForBaseClass added in v0.4.0

func (c *CommandExecutorBase) GetParentCommandExecutorForBaseClass() (parentCommandExecutorForBaseClass CommandExecutor, err error)

func (*CommandExecutorBase) MustGetParentCommandExecutorForBaseClass added in v0.4.0

func (c *CommandExecutorBase) MustGetParentCommandExecutorForBaseClass() (parentCommandExecutorForBaseClass CommandExecutor)

func (*CommandExecutorBase) MustRunCommandAndGetStdoutAsBytes added in v0.4.0

func (c *CommandExecutorBase) MustRunCommandAndGetStdoutAsBytes(options *RunCommandOptions) (stdout []byte)

func (*CommandExecutorBase) MustRunCommandAndGetStdoutAsFloat64 added in v0.4.0

func (c *CommandExecutorBase) MustRunCommandAndGetStdoutAsFloat64(options *RunCommandOptions) (stdout float64)

func (*CommandExecutorBase) MustRunCommandAndGetStdoutAsLines added in v0.4.2

func (c *CommandExecutorBase) MustRunCommandAndGetStdoutAsLines(options *RunCommandOptions) (stdoutLines []string)

func (*CommandExecutorBase) MustRunCommandAndGetStdoutAsString added in v0.4.0

func (c *CommandExecutorBase) MustRunCommandAndGetStdoutAsString(options *RunCommandOptions) (stdout string)

func (*CommandExecutorBase) MustSetParentCommandExecutorForBaseClass added in v0.4.0

func (c *CommandExecutorBase) MustSetParentCommandExecutorForBaseClass(parentCommandExecutorForBaseClass CommandExecutor)

func (*CommandExecutorBase) RunCommandAndGetStdoutAsBytes added in v0.4.0

func (c *CommandExecutorBase) RunCommandAndGetStdoutAsBytes(options *RunCommandOptions) (stdout []byte, err error)

func (*CommandExecutorBase) RunCommandAndGetStdoutAsFloat64 added in v0.4.0

func (c *CommandExecutorBase) RunCommandAndGetStdoutAsFloat64(options *RunCommandOptions) (stdout float64, err error)

func (*CommandExecutorBase) RunCommandAndGetStdoutAsLines added in v0.4.2

func (c *CommandExecutorBase) RunCommandAndGetStdoutAsLines(options *RunCommandOptions) (stdoutLines []string, err error)

func (*CommandExecutorBase) RunCommandAndGetStdoutAsString added in v0.4.0

func (c *CommandExecutorBase) RunCommandAndGetStdoutAsString(options *RunCommandOptions) (stdout string, err error)

func (*CommandExecutorBase) SetParentCommandExecutorForBaseClass added in v0.4.0

func (c *CommandExecutorBase) SetParentCommandExecutorForBaseClass(parentCommandExecutorForBaseClass CommandExecutor) (err error)

type CommandOutput added in v0.4.0

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

func NewCommandOutput added in v0.4.0

func NewCommandOutput() (c *CommandOutput)

func (*CommandOutput) GetCmdRunError added in v0.4.0

func (c *CommandOutput) GetCmdRunError() (cmdRunError *error, err error)

func (*CommandOutput) GetCmdRunErrorStringOrEmptyStringIfUnset added in v0.4.0

func (o *CommandOutput) GetCmdRunErrorStringOrEmptyStringIfUnset() (cmdRunErrorString string)

func (*CommandOutput) GetReturnCode added in v0.4.0

func (o *CommandOutput) GetReturnCode() (returnCode int, err error)

func (*CommandOutput) GetStderr added in v0.4.0

func (c *CommandOutput) GetStderr() (stderr *[]byte, err error)

func (*CommandOutput) GetStderrAsString added in v0.4.0

func (o *CommandOutput) GetStderrAsString() (stderr string, err error)

func (*CommandOutput) GetStderrAsStringOrEmptyIfUnset added in v0.4.0

func (o *CommandOutput) GetStderrAsStringOrEmptyIfUnset() (stderr string)

func (*CommandOutput) GetStdout added in v0.4.0

func (c *CommandOutput) GetStdout() (stdout *[]byte, err error)

func (*CommandOutput) GetStdoutAsBytes added in v0.4.0

func (o *CommandOutput) GetStdoutAsBytes() (stdout []byte, err error)

func (*CommandOutput) GetStdoutAsFloat64 added in v0.4.0

func (c *CommandOutput) GetStdoutAsFloat64() (stdout float64, err error)

func (*CommandOutput) GetStdoutAsLines added in v0.4.0

func (o *CommandOutput) GetStdoutAsLines() (stdoutLines []string, err error)

func (*CommandOutput) GetStdoutAsString added in v0.4.0

func (o *CommandOutput) GetStdoutAsString() (stdout string, err error)

func (*CommandOutput) IsExitSuccess added in v0.4.0

func (o *CommandOutput) IsExitSuccess() (isSuccess bool)

func (*CommandOutput) IsTimedOut added in v0.4.0

func (o *CommandOutput) IsTimedOut() (IsTimedOut bool, err error)

func (*CommandOutput) LogStdoutAsInfo added in v0.4.0

func (c *CommandOutput) LogStdoutAsInfo() (err error)

func (*CommandOutput) MustGetCmdRunError added in v0.4.0

func (c *CommandOutput) MustGetCmdRunError() (cmdRunError *error)

func (*CommandOutput) MustGetReturnCode added in v0.4.0

func (c *CommandOutput) MustGetReturnCode() (returnCode int)

func (*CommandOutput) MustGetStderr added in v0.4.0

func (c *CommandOutput) MustGetStderr() (stderr *[]byte)

func (*CommandOutput) MustGetStderrAsString added in v0.4.0

func (c *CommandOutput) MustGetStderrAsString() (stdout string)

func (*CommandOutput) MustGetStdout added in v0.4.0

func (c *CommandOutput) MustGetStdout() (stdout *[]byte)

func (*CommandOutput) MustGetStdoutAsBytes added in v0.4.0

func (c *CommandOutput) MustGetStdoutAsBytes() (stdout []byte)

func (*CommandOutput) MustGetStdoutAsFloat64 added in v0.4.0

func (c *CommandOutput) MustGetStdoutAsFloat64() (stdout float64)

func (*CommandOutput) MustGetStdoutAsLines added in v0.4.0

func (c *CommandOutput) MustGetStdoutAsLines() (stdoutLines []string)

func (*CommandOutput) MustGetStdoutAsString added in v0.4.0

func (c *CommandOutput) MustGetStdoutAsString() (stdout string)

func (*CommandOutput) MustIsTimedOut added in v0.4.0

func (c *CommandOutput) MustIsTimedOut() (IsTimedOut bool)

func (*CommandOutput) MustLogStdoutAsInfo added in v0.4.0

func (c *CommandOutput) MustLogStdoutAsInfo()

func (*CommandOutput) MustSetReturnCode added in v0.4.0

func (c *CommandOutput) MustSetReturnCode(returnCode int)

func (*CommandOutput) MustSetStderr added in v0.4.0

func (c *CommandOutput) MustSetStderr(stderr []byte)

func (*CommandOutput) MustSetStdout added in v0.4.0

func (c *CommandOutput) MustSetStdout(stdout []byte)

func (*CommandOutput) SetCmdRunError added in v0.4.0

func (o *CommandOutput) SetCmdRunError(err error)

func (*CommandOutput) SetReturnCode added in v0.4.0

func (o *CommandOutput) SetReturnCode(returnCode int) (err error)

func (*CommandOutput) SetStderr added in v0.4.0

func (o *CommandOutput) SetStderr(stderr []byte) (err error)

func (*CommandOutput) SetStdout added in v0.4.0

func (o *CommandOutput) SetStdout(stdout []byte) (err error)

type ContinuousIntegrationService added in v0.13.2

type ContinuousIntegrationService struct {
}

func ContinuousIntegration added in v0.13.2

func ContinuousIntegration() (continuousIntegration *ContinuousIntegrationService)

func NewContinuousIntegrationService added in v0.13.2

func NewContinuousIntegrationService() (continuousIntegration *ContinuousIntegrationService)

func (*ContinuousIntegrationService) IsRunningInCircleCi added in v0.13.2

func (c *ContinuousIntegrationService) IsRunningInCircleCi() (isRunningInGitlab bool)

func (*ContinuousIntegrationService) IsRunningInContinuousIntegration added in v0.13.2

func (c *ContinuousIntegrationService) IsRunningInContinuousIntegration() (isRunningInContinousIntegration bool)

func (*ContinuousIntegrationService) IsRunningInGithub added in v0.13.2

func (c *ContinuousIntegrationService) IsRunningInGithub() (isRunningInGitlab bool)

func (*ContinuousIntegrationService) IsRunningInGitlab added in v0.13.2

func (c *ContinuousIntegrationService) IsRunningInGitlab() (isRunningInGitlab bool)

func (*ContinuousIntegrationService) IsRunningInTravis added in v0.13.2

func (c *ContinuousIntegrationService) IsRunningInTravis() (isRunningInGitlab bool)

type CreateRepositoryOptions added in v0.13.1

type CreateRepositoryOptions struct {
	BareRepository            bool
	Verbose                   bool
	InitializeWithEmptyCommit bool
}

func NewCreateRepositoryOptions added in v0.13.1

func NewCreateRepositoryOptions() (c *CreateRepositoryOptions)

func (*CreateRepositoryOptions) GetBareRepository added in v0.13.1

func (c *CreateRepositoryOptions) GetBareRepository() (bareRepository bool)

func (*CreateRepositoryOptions) GetInitializeWithEmptyCommit added in v0.14.1

func (c *CreateRepositoryOptions) GetInitializeWithEmptyCommit() (initializeWithEmptyCommit bool)

func (*CreateRepositoryOptions) GetVerbose added in v0.13.1

func (c *CreateRepositoryOptions) GetVerbose() (verbose bool)

func (*CreateRepositoryOptions) SetBareRepository added in v0.13.1

func (c *CreateRepositoryOptions) SetBareRepository(bareRepository bool)

func (*CreateRepositoryOptions) SetInitializeWithEmptyCommit added in v0.14.1

func (c *CreateRepositoryOptions) SetInitializeWithEmptyCommit(initializeWithEmptyCommit bool)

func (*CreateRepositoryOptions) SetVerbose added in v0.13.1

func (c *CreateRepositoryOptions) SetVerbose(verbose bool)

type DirectoriesService added in v0.6.0

type DirectoriesService struct {
}

func Directories added in v0.6.0

func Directories() (d *DirectoriesService)

func NewDirectoriesService added in v0.6.0

func NewDirectoriesService() (d *DirectoriesService)

func (*DirectoriesService) CreateLocalDirectoryByPath added in v0.6.0

func (d *DirectoriesService) CreateLocalDirectoryByPath(path string, verbose bool) (l Directory, err error)

func (*DirectoriesService) MustCreateLocalDirectoryByPath added in v0.6.0

func (d *DirectoriesService) MustCreateLocalDirectoryByPath(path string, verbose bool) (l Directory)

type Directory

type Directory interface {
	Create(verbose bool) (err error)
	Delete(verbose bool) (err error)
	Exists() (exists bool, err error)
	GetFileInDirectory(pathToFile ...string) (file File, err error)
	GetLocalPath() (localPath string, err error)
	GetSubDirectory(path ...string) (subDirectory Directory, err error)
	IsLocalDirectory() (isLocalDirectory bool)
	MustCreate(verbose bool)
	MustDelete(verbose bool)
	MustExists() (exists bool)
	MustGetSubDirectory(path ...string) (subDirectory Directory)
	MustGetFileInDirectory(pathToFile ...string) (file File)
	MustGetLocalPath() (localPath string)

	// All methods below this line can be implemented by embedding the `DirectoryBase` struct:
	GetFilePathInDirectory(path ...string) (filePath string, err error)
	MustGetFilePathInDirectory(path ...string) (filePath string)
}

type DirectoryBase added in v0.9.0

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

func NewDirectoryBase added in v0.9.0

func NewDirectoryBase() (d *DirectoryBase)

func (*DirectoryBase) CreateFileInDirectoryFromString added in v0.14.7

func (d *DirectoryBase) CreateFileInDirectoryFromString(content string, verbose bool, pathToCreate ...string) (createdFile File, err error)

func (*DirectoryBase) GetFilePathInDirectory added in v0.9.0

func (d *DirectoryBase) GetFilePathInDirectory(path ...string) (filePath string, err error)

func (*DirectoryBase) GetParentDirectoryForBaseClass added in v0.9.0

func (d *DirectoryBase) GetParentDirectoryForBaseClass() (parentDirectoryForBaseClass Directory, err error)

func (*DirectoryBase) MustCreateFileInDirectoryFromString added in v0.14.7

func (d *DirectoryBase) MustCreateFileInDirectoryFromString(content string, verbose bool, pathToCreate ...string) (createdFile File)

func (*DirectoryBase) MustGetFilePathInDirectory added in v0.9.0

func (d *DirectoryBase) MustGetFilePathInDirectory(path ...string) (filePath string)

func (*DirectoryBase) MustGetParentDirectoryForBaseClass added in v0.9.0

func (d *DirectoryBase) MustGetParentDirectoryForBaseClass() (parentDirectoryForBaseClass Directory)

func (*DirectoryBase) MustSetParentDirectoryForBaseClass added in v0.9.0

func (d *DirectoryBase) MustSetParentDirectoryForBaseClass(parentDirectoryForBaseClass Directory)

func (*DirectoryBase) SetParentDirectoryForBaseClass added in v0.9.0

func (d *DirectoryBase) SetParentDirectoryForBaseClass(parentDirectoryForBaseClass Directory) (err error)

type DurationFormatterService added in v0.2.0

type DurationFormatterService struct {
}

func DurationFormatter added in v0.2.0

func DurationFormatter() (d *DurationFormatterService)

func NewDurationFormatterService added in v0.2.0

func NewDurationFormatterService() (d *DurationFormatterService)

func (*DurationFormatterService) MustToString added in v0.2.0

func (d *DurationFormatterService) MustToString(duration *time.Duration) (durationString string)

func (*DurationFormatterService) ToString added in v0.2.0

func (d *DurationFormatterService) ToString(duration *time.Duration) (durationString string, err error)

type DurationParserService added in v0.4.0

type DurationParserService struct{}

func DurationParser added in v0.4.0

func DurationParser() (durationParser *DurationParserService)

func NewDurationParserService added in v0.4.0

func NewDurationParserService() (d *DurationParserService)

func (*DurationParserService) MustToSecondsAsString added in v0.4.0

func (d *DurationParserService) MustToSecondsAsString(durationString string) (secondsString string)

func (*DurationParserService) MustToSecondsAsTimeDuration added in v0.4.0

func (d *DurationParserService) MustToSecondsAsTimeDuration(durationString string) (duration *time.Duration)

func (*DurationParserService) MustToSecondsFloat64 added in v0.4.0

func (d *DurationParserService) MustToSecondsFloat64(durationString string) (seconds float64)

func (*DurationParserService) MustToSecondsInt64 added in v0.4.0

func (d *DurationParserService) MustToSecondsInt64(durationString string) (seconds int64)

func (*DurationParserService) ToSecondsAsString added in v0.4.0

func (d *DurationParserService) ToSecondsAsString(durationString string) (secondsString string, err error)

func (*DurationParserService) ToSecondsAsTimeDuration added in v0.4.0

func (d *DurationParserService) ToSecondsAsTimeDuration(durationString string) (duration *time.Duration, err error)

func (*DurationParserService) ToSecondsFloat64 added in v0.4.0

func (d *DurationParserService) ToSecondsFloat64(durationString string) (seconds float64, err error)

func (*DurationParserService) ToSecondsInt64 added in v0.4.0

func (d *DurationParserService) ToSecondsInt64(durationString string) (seconds int64, err error)

type ErrorsService

type ErrorsService struct{}

func Errors

func Errors() (e *ErrorsService)

func NewErrorsService

func NewErrorsService() (e *ErrorsService)

func (ErrorsService) IsEmptyStringError

func (e ErrorsService) IsEmptyStringError(err error) (isEmptyStringError bool)

func (ErrorsService) IsNilError

func (e ErrorsService) IsNilError(err error) (IsNilError bool)

func (ErrorsService) IsNotImplementedError

func (e ErrorsService) IsNotImplementedError(err error) (isNotImplementedError bool)

func (ErrorsService) IsTracedError

func (e ErrorsService) IsTracedError(err error) (isTracedError bool)

Returns true if given error 'err' is a TracedError, false otherwise.

type ExecService added in v0.4.0

type ExecService struct {
	CommandExecutorBase
}

func Exec added in v0.4.0

func Exec() (e *ExecService)

func NewExec added in v0.4.0

func NewExec() (e *ExecService)

func NewExecService added in v0.4.0

func NewExecService() (e *ExecService)

func (*ExecService) MustRunCommand added in v0.4.0

func (e *ExecService) MustRunCommand(options *RunCommandOptions) (commandOutput *CommandOutput)

func (*ExecService) RunCommand added in v0.4.0

func (e *ExecService) RunCommand(options *RunCommandOptions) (commandOutput *CommandOutput, err error)

type ExitCodesService added in v0.4.0

type ExitCodesService struct {
}

func ExitCodes added in v0.4.0

func ExitCodes() (exitCodes *ExitCodesService)

func NewExitCodesService added in v0.4.0

func NewExitCodesService() (e *ExitCodesService)

func (*ExitCodesService) ExitCodeOK added in v0.4.0

func (e *ExitCodesService) ExitCodeOK() (exitCode int)

func (*ExitCodesService) ExitCodeTimeout added in v0.4.0

func (e *ExitCodesService) ExitCodeTimeout() (exitCode int)

type File

type File interface {
	Create(verbose bool) (err error)
	Delete(verbose bool) (err error)
	Exists() (exists bool, err error)
	GetBaseName() (baseName string, err error)
	GetLocalPath() (localPath string, err error)
	GetParentDirectory() (parentDirectory Directory, err error)
	GetUriAsString() (uri string, err error)
	MustCreate(verbose bool)
	MustDelete(verbose bool)
	MustExists() (exists bool)
	MustGetBaseName() (baseName string)
	MustGetLocalPath() (localPath string)
	MustGetParentDirectory() (parentDirectory Directory)
	MustGetUriAsString() (uri string)
	MustReadAsBytes() (content []byte)
	MustWriteBytes(toWrite []byte, verbose bool)
	ReadAsBytes() (content []byte, err error)
	WriteBytes(toWrite []byte, verbose bool) (err error)

	// All methods below this line can be implemented by embedding the `FileBase` struct:
	GetSha256Sum() (sha256sum string, err error)
	IsContentEqualByComparingSha256Sum(other File, verbose bool) (isMatching bool, err error)
	IsMatchingSha256Sum(sha256sum string) (isMatching bool, err error)
	MustGetSha256Sum() (sha256sum string)
	MustIsContentEqualByComparingSha256Sum(other File, verbose bool) (isMatching bool)
	MustIsMatchingSha256Sum(sha256sum string) (isMatching bool)
	MustReadAsString() (content string)
	MustWriteString(content string, verbose bool)
	ReadAsString() (content string, err error)
	WriteString(content string, verbose bool) (err error)
}

A File represents any kind of file regardless if a local file or a remote file.

func EnableLoggingToUsersHome added in v0.9.0

func EnableLoggingToUsersHome(applicationName string, verbose bool) (logFile File, err error)

func GetFileByOsFile added in v0.1.3

func GetFileByOsFile(osFile *os.File) (file File, err error)

func MustEnableLoggingToUsersHome added in v0.9.0

func MustEnableLoggingToUsersHome(applicationName string, verbose bool) (logFile File)

func MustGetFileByOsFile added in v0.1.3

func MustGetFileByOsFile(osFile *os.File) (file File)

type FileBase added in v0.1.3

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

This is the base for `File` providing most convenience functions for file operations.

func NewFileBase added in v0.1.3

func NewFileBase() (f *FileBase)

func (*FileBase) GetParentFileForBaseClass added in v0.1.3

func (f *FileBase) GetParentFileForBaseClass() (parentFileForBaseClass File, err error)

func (*FileBase) GetSha256Sum added in v0.9.0

func (f *FileBase) GetSha256Sum() (sha256sum string, err error)

func (*FileBase) IsContentEqualByComparingSha256Sum added in v0.15.0

func (f *FileBase) IsContentEqualByComparingSha256Sum(otherFile File, verbose bool) (isEqual bool, err error)

func (*FileBase) IsMatchingSha256Sum added in v0.14.3

func (f *FileBase) IsMatchingSha256Sum(sha256sum string) (isMatching bool, err error)

func (*FileBase) MustGetParentFileForBaseClass added in v0.1.3

func (f *FileBase) MustGetParentFileForBaseClass() (parentFileForBaseClass File)

func (*FileBase) MustGetSha256Sum added in v0.9.0

func (f *FileBase) MustGetSha256Sum() (sha256sum string)

func (*FileBase) MustIsContentEqualByComparingSha256Sum added in v0.15.0

func (f *FileBase) MustIsContentEqualByComparingSha256Sum(otherFile File, verbose bool) (isEqual bool)

func (*FileBase) MustIsMatchingSha256Sum added in v0.14.3

func (f *FileBase) MustIsMatchingSha256Sum(sha256sum string) (isMatching bool)

func (*FileBase) MustReadAsString added in v0.1.3

func (f *FileBase) MustReadAsString() (content string)

func (*FileBase) MustSetParentFileForBaseClass added in v0.1.3

func (f *FileBase) MustSetParentFileForBaseClass(parentFileForBaseClass File)

func (*FileBase) MustWriteString added in v0.1.3

func (f *FileBase) MustWriteString(toWrite string, verbose bool)

func (*FileBase) ReadAsString added in v0.1.3

func (f *FileBase) ReadAsString() (content string, err error)

func (*FileBase) SetParentFileForBaseClass added in v0.1.3

func (f *FileBase) SetParentFileForBaseClass(parentFileForBaseClass File) (err error)

func (*FileBase) WriteString added in v0.1.3

func (f *FileBase) WriteString(toWrite string, verbose bool) (err error)

type GitCommit added in v0.11.0

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

func NewGitCommit added in v0.11.0

func NewGitCommit() (g *GitCommit)

func (*GitCommit) GetGitRepo added in v0.11.0

func (g *GitCommit) GetGitRepo() (gitRepo GitRepository, err error)

func (*GitCommit) GetHash added in v0.11.0

func (g *GitCommit) GetHash() (hash string, err error)

func (*GitCommit) MustGetGitRepo added in v0.11.0

func (g *GitCommit) MustGetGitRepo() (gitRepo GitRepository)

func (*GitCommit) MustGetHash added in v0.11.0

func (g *GitCommit) MustGetHash() (hash string)

func (*GitCommit) MustSetGitRepo added in v0.11.0

func (g *GitCommit) MustSetGitRepo(gitRepo GitRepository)

func (*GitCommit) MustSetHash added in v0.11.0

func (g *GitCommit) MustSetHash(hash string)

func (*GitCommit) SetGitRepo added in v0.11.0

func (g *GitCommit) SetGitRepo(gitRepo GitRepository) (err error)

func (*GitCommit) SetHash added in v0.11.0

func (g *GitCommit) SetHash(hash string) (err error)

type GitCommitOptions added in v0.11.0

type GitCommitOptions struct {
	Message    string
	AllowEmpty bool
	Verbose    bool
}

func NewGitCommitOptions added in v0.11.0

func NewGitCommitOptions() (g *GitCommitOptions)

func (*GitCommitOptions) GetAllowEmpty added in v0.11.0

func (g *GitCommitOptions) GetAllowEmpty() (allowEmpty bool)

func (*GitCommitOptions) GetMessage added in v0.11.0

func (g *GitCommitOptions) GetMessage() (message string, err error)

func (*GitCommitOptions) GetVerbose added in v0.11.0

func (g *GitCommitOptions) GetVerbose() (verbose bool)

func (*GitCommitOptions) MustGetMessage added in v0.11.0

func (g *GitCommitOptions) MustGetMessage() (message string)

func (*GitCommitOptions) MustSetMessage added in v0.11.0

func (g *GitCommitOptions) MustSetMessage(message string)

func (*GitCommitOptions) SetAllowEmpty added in v0.11.0

func (g *GitCommitOptions) SetAllowEmpty(allowEmpty bool)

func (*GitCommitOptions) SetMessage added in v0.11.0

func (g *GitCommitOptions) SetMessage(message string) (err error)

func (*GitCommitOptions) SetVerbose added in v0.11.0

func (g *GitCommitOptions) SetVerbose(verbose bool)

type GitConfigSetOptions added in v0.11.0

type GitConfigSetOptions struct {
	Name    string
	Email   string
	Verbose bool
}

func NewGitConfigSetOptions added in v0.11.0

func NewGitConfigSetOptions() (g *GitConfigSetOptions)

func (*GitConfigSetOptions) GetEmail added in v0.11.0

func (g *GitConfigSetOptions) GetEmail() (email string, err error)

func (*GitConfigSetOptions) GetName added in v0.11.0

func (g *GitConfigSetOptions) GetName() (name string, err error)

func (*GitConfigSetOptions) GetVerbose added in v0.11.0

func (g *GitConfigSetOptions) GetVerbose() (verbose bool)

func (*GitConfigSetOptions) IsEmailSet added in v0.11.0

func (g *GitConfigSetOptions) IsEmailSet() (isSet bool)

func (*GitConfigSetOptions) IsNameSet added in v0.11.0

func (g *GitConfigSetOptions) IsNameSet() (isSet bool)

func (*GitConfigSetOptions) MustGetEmail added in v0.11.0

func (g *GitConfigSetOptions) MustGetEmail() (email string)

func (*GitConfigSetOptions) MustGetName added in v0.11.0

func (g *GitConfigSetOptions) MustGetName() (name string)

func (*GitConfigSetOptions) MustSetEmail added in v0.11.0

func (g *GitConfigSetOptions) MustSetEmail(email string)

func (*GitConfigSetOptions) MustSetName added in v0.11.0

func (g *GitConfigSetOptions) MustSetName(name string)

func (*GitConfigSetOptions) SetEmail added in v0.11.0

func (g *GitConfigSetOptions) SetEmail(email string) (err error)

func (*GitConfigSetOptions) SetName added in v0.11.0

func (g *GitConfigSetOptions) SetName(name string) (err error)

func (*GitConfigSetOptions) SetVerbose added in v0.11.0

func (g *GitConfigSetOptions) SetVerbose(verbose bool)

type GitRepositoriesService added in v0.11.0

type GitRepositoriesService struct {
}

func GitRepositories added in v0.11.0

func GitRepositories() (g *GitRepositoriesService)

func NewGitRepositories added in v0.11.0

func NewGitRepositories() (g *GitRepositoriesService)

func NewGitRepositoriesService added in v0.11.0

func NewGitRepositoriesService() (g *GitRepositoriesService)

func (*GitRepositoriesService) CloneGitRepositoryToDirectory added in v0.14.1

func (g *GitRepositoriesService) CloneGitRepositoryToDirectory(toClone GitRepository, destinationPath string, verbose bool) (repo *LocalGitRepository, err error)

func (*GitRepositoriesService) CloneGitRepositoryToTemporaryDirectory added in v0.14.1

func (g *GitRepositoriesService) CloneGitRepositoryToTemporaryDirectory(toClone GitRepository, verbose bool) (repo *LocalGitRepository, err error)

func (*GitRepositoriesService) CloneToDirectoryByPath added in v0.11.0

func (g *GitRepositoriesService) CloneToDirectoryByPath(urlOrPath string, destinationPath string, verbose bool) (repo *LocalGitRepository, err error)

func (*GitRepositoriesService) CloneToTemporaryDirectory added in v0.11.0

func (g *GitRepositoriesService) CloneToTemporaryDirectory(urlOrPath string, verbose bool) (repo *LocalGitRepository, err error)

func (*GitRepositoriesService) CreateTemporaryInitializedRepository added in v0.11.0

func (g *GitRepositoriesService) CreateTemporaryInitializedRepository(options *CreateRepositoryOptions) (repo *LocalGitRepository, err error)

func (*GitRepositoriesService) MustCloneGitRepositoryToDirectory added in v0.14.1

func (g *GitRepositoriesService) MustCloneGitRepositoryToDirectory(toClone GitRepository, destinationPath string, verbose bool) (repo *LocalGitRepository)

func (*GitRepositoriesService) MustCloneGitRepositoryToTemporaryDirectory added in v0.14.1

func (g *GitRepositoriesService) MustCloneGitRepositoryToTemporaryDirectory(toClone GitRepository, verbose bool) (repo *LocalGitRepository)

func (*GitRepositoriesService) MustCloneToDirectoryByPath added in v0.11.0

func (g *GitRepositoriesService) MustCloneToDirectoryByPath(urlOrPath string, destinationPath string, verbose bool) (repo *LocalGitRepository)

func (*GitRepositoriesService) MustCloneToTemporaryDirectory added in v0.11.0

func (g *GitRepositoriesService) MustCloneToTemporaryDirectory(urlOrPath string, verbose bool) (repo *LocalGitRepository)

func (*GitRepositoriesService) MustCreateTemporaryInitializedRepository added in v0.11.0

func (g *GitRepositoriesService) MustCreateTemporaryInitializedRepository(options *CreateRepositoryOptions) (repo *LocalGitRepository)

type GitRepository added in v0.11.0

type GitRepository interface {
}

A git repository can be a LocalGitRepository or remote repositories like Gitlab or Github.

type GitlabAuthenticationOptions added in v0.13.0

type GitlabAuthenticationOptions struct {
	AccessTokensFromGopass []string
	Verbose                bool
	GitlabUrl              string
}

func NewGitlabAuthenticationOptions added in v0.13.0

func NewGitlabAuthenticationOptions() (g *GitlabAuthenticationOptions)

func (*GitlabAuthenticationOptions) GetAccessTokensFromGopass added in v0.13.0

func (g *GitlabAuthenticationOptions) GetAccessTokensFromGopass() (accessTokensFromGopass []string, err error)

func (*GitlabAuthenticationOptions) GetGitlabUrl added in v0.13.0

func (g *GitlabAuthenticationOptions) GetGitlabUrl() (gitlabUrl string, err error)

func (*GitlabAuthenticationOptions) GetVerbose added in v0.13.0

func (g *GitlabAuthenticationOptions) GetVerbose() (verbose bool, err error)

func (*GitlabAuthenticationOptions) IsAuthenticatingAgainst added in v0.13.0

func (g *GitlabAuthenticationOptions) IsAuthenticatingAgainst(serviceName string) (isAuthenticatingAgainst bool, err error)

func (*GitlabAuthenticationOptions) IsVerbose added in v0.13.0

func (g *GitlabAuthenticationOptions) IsVerbose() (isVerbose bool)

func (*GitlabAuthenticationOptions) MustGetAccessTokensFromGopass added in v0.13.0

func (g *GitlabAuthenticationOptions) MustGetAccessTokensFromGopass() (accessTokensFromGopass []string)

func (*GitlabAuthenticationOptions) MustGetGitlabUrl added in v0.13.0

func (g *GitlabAuthenticationOptions) MustGetGitlabUrl() (gitlabUrl string)

func (*GitlabAuthenticationOptions) MustGetVerbose added in v0.13.0

func (g *GitlabAuthenticationOptions) MustGetVerbose() (verbose bool)

func (*GitlabAuthenticationOptions) MustIsAuthenticatingAgainst added in v0.13.0

func (g *GitlabAuthenticationOptions) MustIsAuthenticatingAgainst(serviceName string) (isAuthenticatingAgainst bool)

func (*GitlabAuthenticationOptions) MustSetAccessTokensFromGopass added in v0.13.0

func (g *GitlabAuthenticationOptions) MustSetAccessTokensFromGopass(accessTokensFromGopass []string)

func (*GitlabAuthenticationOptions) MustSetGitlabUrl added in v0.13.0

func (g *GitlabAuthenticationOptions) MustSetGitlabUrl(gitlabUrl string)

func (*GitlabAuthenticationOptions) MustSetVerbose added in v0.13.0

func (g *GitlabAuthenticationOptions) MustSetVerbose(verbose bool)

func (*GitlabAuthenticationOptions) SetAccessTokensFromGopass added in v0.13.0

func (g *GitlabAuthenticationOptions) SetAccessTokensFromGopass(accessTokensFromGopass []string) (err error)

func (*GitlabAuthenticationOptions) SetGitlabUrl added in v0.13.0

func (g *GitlabAuthenticationOptions) SetGitlabUrl(gitlabUrl string) (err error)

func (*GitlabAuthenticationOptions) SetVerbose added in v0.13.0

func (g *GitlabAuthenticationOptions) SetVerbose(verbose bool) (err error)

type GoogleStorageBucket added in v0.13.2

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

func GetGoogleStorageBucketByName added in v0.13.2

func GetGoogleStorageBucketByName(bucketName string) (g *GoogleStorageBucket, err error)

func MustGetGoogleStorageBucketByName added in v0.13.2

func MustGetGoogleStorageBucketByName(bucketName string) (g *GoogleStorageBucket)

func NewGoogleStorageBucket added in v0.13.2

func NewGoogleStorageBucket() (g *GoogleStorageBucket)

func (*GoogleStorageBucket) Exists added in v0.13.2

func (g *GoogleStorageBucket) Exists() (bucketExists bool, err error)

func (*GoogleStorageBucket) GetName added in v0.13.2

func (g *GoogleStorageBucket) GetName() (name string, err error)

func (*GoogleStorageBucket) GetNativeBucket added in v0.13.2

func (g *GoogleStorageBucket) GetNativeBucket() (nativeBucket *storage.BucketHandle, err error)

func (*GoogleStorageBucket) GetNativeClient added in v0.13.2

func (g *GoogleStorageBucket) GetNativeClient() (nativeClient *storage.Client, err error)

func (*GoogleStorageBucket) MustExists added in v0.13.2

func (g *GoogleStorageBucket) MustExists() (bucketExists bool)

func (*GoogleStorageBucket) MustGetName added in v0.13.2

func (g *GoogleStorageBucket) MustGetName() (name string)

func (*GoogleStorageBucket) MustGetNativeBucket added in v0.13.2

func (g *GoogleStorageBucket) MustGetNativeBucket() (nativeBucket *storage.BucketHandle)

func (*GoogleStorageBucket) MustGetNativeClient added in v0.13.2

func (g *GoogleStorageBucket) MustGetNativeClient() (nativeClient *storage.Client)

func (*GoogleStorageBucket) MustSetName added in v0.13.2

func (g *GoogleStorageBucket) MustSetName(name string)

func (*GoogleStorageBucket) MustSetNativeClient added in v0.13.2

func (g *GoogleStorageBucket) MustSetNativeClient(nativeClient *storage.Client)

func (*GoogleStorageBucket) SetName added in v0.13.2

func (g *GoogleStorageBucket) SetName(name string) (err error)

func (*GoogleStorageBucket) SetNativeClient added in v0.13.2

func (g *GoogleStorageBucket) SetNativeClient(nativeClient *storage.Client) (err error)

type LocalDirectory added in v0.6.0

type LocalDirectory struct {
	DirectoryBase
	// contains filtered or unexported fields
}

func GetLocalDirectoryByPath added in v0.6.0

func GetLocalDirectoryByPath(path string) (l *LocalDirectory, err error)

func MustGetLocalDirectoryByPath added in v0.6.0

func MustGetLocalDirectoryByPath(path string) (l *LocalDirectory)

func NewLocalDirectory added in v0.6.0

func NewLocalDirectory() (l *LocalDirectory)

func (*LocalDirectory) Create added in v0.6.0

func (l *LocalDirectory) Create(verbose bool) (err error)

func (*LocalDirectory) CreateFileInDirectory added in v0.11.0

func (l *LocalDirectory) CreateFileInDirectory(path ...string) (createdFile File, err error)

func (*LocalDirectory) Delete added in v0.6.0

func (l *LocalDirectory) Delete(verbose bool) (err error)

func (*LocalDirectory) Exists added in v0.6.0

func (l *LocalDirectory) Exists() (exists bool, err error)

func (*LocalDirectory) GetFileInDirectory added in v0.9.0

func (l *LocalDirectory) GetFileInDirectory(path ...string) (file File, err error)

func (*LocalDirectory) GetLocalPath added in v0.6.0

func (l *LocalDirectory) GetLocalPath() (localPath string, err error)

func (*LocalDirectory) GetSubDirectory added in v0.9.0

func (l *LocalDirectory) GetSubDirectory(path ...string) (subDirectory Directory, err error)

func (*LocalDirectory) IsLocalDirectory added in v0.13.1

func (l *LocalDirectory) IsLocalDirectory() (isLocalDirectory bool)

func (*LocalDirectory) MustCreate added in v0.6.0

func (l *LocalDirectory) MustCreate(verbose bool)

func (*LocalDirectory) MustCreateFileInDirectory added in v0.11.0

func (l *LocalDirectory) MustCreateFileInDirectory(path ...string) (createdFile File)

func (*LocalDirectory) MustDelete added in v0.6.0

func (l *LocalDirectory) MustDelete(verbose bool)

func (*LocalDirectory) MustExists added in v0.6.0

func (l *LocalDirectory) MustExists() (exists bool)

func (*LocalDirectory) MustGetFileInDirectory added in v0.9.0

func (l *LocalDirectory) MustGetFileInDirectory(path ...string) (file File)

func (*LocalDirectory) MustGetLocalPath added in v0.6.0

func (l *LocalDirectory) MustGetLocalPath() (localPath string)

func (*LocalDirectory) MustGetSubDirectory added in v0.9.0

func (l *LocalDirectory) MustGetSubDirectory(path ...string) (subDirectory Directory)

func (*LocalDirectory) MustSetLocalPath added in v0.6.0

func (l *LocalDirectory) MustSetLocalPath(localPath string)

func (*LocalDirectory) SetLocalPath added in v0.6.0

func (l *LocalDirectory) SetLocalPath(localPath string) (err error)

type LocalFile

type LocalFile struct {
	FileBase
	// contains filtered or unexported fields
}

A LocalFile represents a locally available file.

func GetLocalFileByPath added in v0.5.5

func GetLocalFileByPath(localPath string) (l *LocalFile, err error)

func MustGetLocalFileByPath added in v0.5.5

func MustGetLocalFileByPath(localPath string) (l *LocalFile)

func MustNewLocalFileByPath

func MustNewLocalFileByPath(localPath string) (l *LocalFile)

func NewLocalFile

func NewLocalFile() (l *LocalFile)

func NewLocalFileByPath

func NewLocalFileByPath(localPath string) (l *LocalFile, err error)

func (*LocalFile) Create added in v0.11.0

func (l *LocalFile) Create(verbose bool) (err error)

func (*LocalFile) Delete added in v0.1.3

func (l *LocalFile) Delete(verbose bool) (err error)

Delete a file if it exists. If the file is already absent this function does nothing.

func (*LocalFile) Exists

func (l *LocalFile) Exists() (exists bool, err error)

func (*LocalFile) GetBaseName added in v0.14.2

func (l *LocalFile) GetBaseName() (baseName string, err error)

func (*LocalFile) GetLocalPath

func (l *LocalFile) GetLocalPath() (path string, err error)

func (*LocalFile) GetParentDirectory added in v0.14.6

func (l *LocalFile) GetParentDirectory() (parentDirectory Directory, err error)

func (*LocalFile) GetPath

func (l *LocalFile) GetPath() (path string, err error)

func (*LocalFile) GetUriAsString

func (l *LocalFile) GetUriAsString() (uri string, err error)

func (*LocalFile) IsPathSet

func (l *LocalFile) IsPathSet() (isSet bool)

func (*LocalFile) MustCreate added in v0.11.0

func (l *LocalFile) MustCreate(verbose bool)

func (*LocalFile) MustDelete added in v0.1.3

func (l *LocalFile) MustDelete(verbose bool)

func (*LocalFile) MustExists

func (l *LocalFile) MustExists() (exists bool)

func (*LocalFile) MustGetBaseName added in v0.14.2

func (l *LocalFile) MustGetBaseName() (baseName string)

func (*LocalFile) MustGetLocalPath

func (l *LocalFile) MustGetLocalPath() (path string)

func (*LocalFile) MustGetParentDirectory added in v0.14.6

func (l *LocalFile) MustGetParentDirectory() (parentDirectory Directory)

func (*LocalFile) MustGetPath

func (l *LocalFile) MustGetPath() (path string)

func (*LocalFile) MustGetUriAsString

func (l *LocalFile) MustGetUriAsString() (uri string)

func (*LocalFile) MustReadAsBytes added in v0.1.3

func (l *LocalFile) MustReadAsBytes() (content []byte)

func (*LocalFile) MustSetPath

func (l *LocalFile) MustSetPath(path string)

func (*LocalFile) MustWriteBytes added in v0.1.3

func (l *LocalFile) MustWriteBytes(toWrite []byte, verbose bool)

func (*LocalFile) ReadAsBytes added in v0.1.3

func (l *LocalFile) ReadAsBytes() (content []byte, err error)

func (*LocalFile) SetPath

func (l *LocalFile) SetPath(path string) (err error)

func (*LocalFile) WriteBytes added in v0.1.3

func (l *LocalFile) WriteBytes(toWrite []byte, verbose bool) (err error)

type LocalGitRemote added in v0.14.1

type LocalGitRemote struct {
	Name      string
	RemoteUrl string
}

func MustNewLocalGitRemoteByNativeGoGitRemote added in v0.14.1

func MustNewLocalGitRemoteByNativeGoGitRemote(goGitRemote *git.Remote) (l *LocalGitRemote)

func NewLocalGitRemote added in v0.14.1

func NewLocalGitRemote() (l *LocalGitRemote)

func NewLocalGitRemoteByNativeGoGitRemote added in v0.14.1

func NewLocalGitRemoteByNativeGoGitRemote(goGitRemote *git.Remote) (l *LocalGitRemote, err error)

func (*LocalGitRemote) GetName added in v0.14.1

func (l *LocalGitRemote) GetName() (name string, err error)

func (*LocalGitRemote) GetRemoteUrl added in v0.14.1

func (l *LocalGitRemote) GetRemoteUrl() (remoteUrl string, err error)

func (*LocalGitRemote) MustGetName added in v0.14.1

func (l *LocalGitRemote) MustGetName() (name string)

func (*LocalGitRemote) MustGetRemoteUrl added in v0.14.1

func (l *LocalGitRemote) MustGetRemoteUrl() (remoteUrl string)

func (*LocalGitRemote) MustSetName added in v0.14.1

func (l *LocalGitRemote) MustSetName(name string)

func (*LocalGitRemote) MustSetRemoteUrl added in v0.14.1

func (l *LocalGitRemote) MustSetRemoteUrl(remoteUrl string)

func (*LocalGitRemote) SetName added in v0.14.1

func (l *LocalGitRemote) SetName(name string) (err error)

func (*LocalGitRemote) SetRemoteUrl added in v0.14.1

func (l *LocalGitRemote) SetRemoteUrl(remoteUrl string) (err error)

type LocalGitRepository added in v0.11.0

type LocalGitRepository struct {
	LocalDirectory
}

func GetLocalGitReposioryFromDirectory added in v0.13.1

func GetLocalGitReposioryFromDirectory(directory Directory) (l *LocalGitRepository, err error)

func GetLocalGitRepositoryByPath added in v0.11.0

func GetLocalGitRepositoryByPath(path string) (l *LocalGitRepository, err error)

func MustGetLocalGitReposioryFromDirectory added in v0.13.1

func MustGetLocalGitReposioryFromDirectory(directory Directory) (l *LocalGitRepository)

func MustGetLocalGitRepositoryByPath added in v0.11.0

func MustGetLocalGitRepositoryByPath(path string) (l *LocalGitRepository)

func NewLocalGitRepository added in v0.11.0

func NewLocalGitRepository() (l *LocalGitRepository)

func (*LocalGitRepository) Add added in v0.11.0

func (l *LocalGitRepository) Add(path string) (err error)

func (*LocalGitRepository) Commit added in v0.11.0

func (l *LocalGitRepository) Commit(commitOptions *GitCommitOptions) (createdCommit *GitCommit, err error)

func (*LocalGitRepository) CommitAndPush added in v0.14.1

func (l *LocalGitRepository) CommitAndPush(commitOptions *GitCommitOptions) (createdCommit *GitCommit, err error)

func (*LocalGitRepository) GetAsGoGitRepository added in v0.11.0

func (l *LocalGitRepository) GetAsGoGitRepository() (goGitRepository *git.Repository, err error)

func (*LocalGitRepository) GetCommitByGoGitHash added in v0.11.0

func (l *LocalGitRepository) GetCommitByGoGitHash(goGitHash *plumbing.Hash) (gitCommit *GitCommit, err error)

func (*LocalGitRepository) GetCommitByGoGitReference added in v0.11.0

func (l *LocalGitRepository) GetCommitByGoGitReference(goGitReference *plumbing.Reference) (gitCommit *GitCommit, err error)

func (*LocalGitRepository) GetCurrentCommit added in v0.11.0

func (l *LocalGitRepository) GetCurrentCommit() (gitCommit *GitCommit, err error)

func (*LocalGitRepository) GetCurrentCommitHash added in v0.11.0

func (l *LocalGitRepository) GetCurrentCommitHash() (commitHash string, err error)

func (*LocalGitRepository) GetGoGitConfig added in v0.11.0

func (l *LocalGitRepository) GetGoGitConfig() (config *config.Config, err error)

func (*LocalGitRepository) GetGoGitHead added in v0.11.0

func (l *LocalGitRepository) GetGoGitHead() (head *plumbing.Reference, err error)

func (*LocalGitRepository) GetGoGitWorktree added in v0.11.0

func (l *LocalGitRepository) GetGoGitWorktree() (worktree *git.Worktree, err error)

func (*LocalGitRepository) HasNoUncommittedChanges added in v0.11.0

func (l *LocalGitRepository) HasNoUncommittedChanges() (hasUncommittedChanges bool, err error)

func (*LocalGitRepository) HasUncommittedChanges added in v0.11.0

func (l *LocalGitRepository) HasUncommittedChanges() (hasUncommittedChanges bool, err error)

func (*LocalGitRepository) Init added in v0.11.0

func (l *LocalGitRepository) Init(options *CreateRepositoryOptions) (err error)

func (*LocalGitRepository) IsBareRepository added in v0.14.1

func (l *LocalGitRepository) IsBareRepository(verbose bool) (isBareRepository bool, err error)

func (*LocalGitRepository) IsInitialized added in v0.11.0

func (l *LocalGitRepository) IsInitialized() (isInitialized bool, err error)

func (*LocalGitRepository) MustAdd added in v0.11.0

func (l *LocalGitRepository) MustAdd(path string)

func (*LocalGitRepository) MustCommit added in v0.11.0

func (l *LocalGitRepository) MustCommit(commitOptions *GitCommitOptions) (createdCommit *GitCommit)

func (*LocalGitRepository) MustCommitAndPush added in v0.14.1

func (l *LocalGitRepository) MustCommitAndPush(commitOptions *GitCommitOptions) (createdCommit *GitCommit)

func (*LocalGitRepository) MustGetAsGoGitRepository added in v0.11.0

func (l *LocalGitRepository) MustGetAsGoGitRepository() (goGitRepository *git.Repository)

func (*LocalGitRepository) MustGetCommitByGoGitHash added in v0.11.0

func (l *LocalGitRepository) MustGetCommitByGoGitHash(goGitHash *plumbing.Hash) (gitCommit *GitCommit)

func (*LocalGitRepository) MustGetCommitByGoGitReference added in v0.11.0

func (l *LocalGitRepository) MustGetCommitByGoGitReference(goGitReference *plumbing.Reference) (gitCommit *GitCommit)

func (*LocalGitRepository) MustGetCurrentCommit added in v0.11.0

func (l *LocalGitRepository) MustGetCurrentCommit() (gitCommit *GitCommit)

func (*LocalGitRepository) MustGetCurrentCommitHash added in v0.11.0

func (l *LocalGitRepository) MustGetCurrentCommitHash() (commitHash string)

func (*LocalGitRepository) MustGetGoGitConfig added in v0.11.0

func (l *LocalGitRepository) MustGetGoGitConfig() (config *config.Config)

func (*LocalGitRepository) MustGetGoGitHead added in v0.11.0

func (l *LocalGitRepository) MustGetGoGitHead() (head *plumbing.Reference)

func (*LocalGitRepository) MustGetGoGitWorktree added in v0.11.0

func (l *LocalGitRepository) MustGetGoGitWorktree() (worktree *git.Worktree)

func (*LocalGitRepository) MustHasNoUncommittedChanges added in v0.11.0

func (l *LocalGitRepository) MustHasNoUncommittedChanges() (hasUncommittedChanges bool)

func (*LocalGitRepository) MustHasUncommittedChanges added in v0.11.0

func (l *LocalGitRepository) MustHasUncommittedChanges() (hasUncommittedChanges bool)

func (*LocalGitRepository) MustInit added in v0.11.0

func (l *LocalGitRepository) MustInit(options *CreateRepositoryOptions)

func (*LocalGitRepository) MustIsBareRepository added in v0.14.1

func (l *LocalGitRepository) MustIsBareRepository(verbose bool) (isBareRepository bool)

func (*LocalGitRepository) MustIsInitialized added in v0.11.0

func (l *LocalGitRepository) MustIsInitialized() (isInitialized bool)

func (*LocalGitRepository) MustPull added in v0.11.0

func (l *LocalGitRepository) MustPull(verbose bool)

func (*LocalGitRepository) MustPush added in v0.11.0

func (l *LocalGitRepository) MustPush(verbose bool)

func (*LocalGitRepository) MustSetGitConfig added in v0.11.0

func (l *LocalGitRepository) MustSetGitConfig(options *GitConfigSetOptions)

func (*LocalGitRepository) MustSetGitConfigByGoGitConfig added in v0.11.0

func (l *LocalGitRepository) MustSetGitConfigByGoGitConfig(config *config.Config, verbose bool)

func (*LocalGitRepository) MustSetRemote added in v0.14.1

func (l *LocalGitRepository) MustSetRemote(remoteName string, remotUrl string, verbose bool) (remote *LocalGitRemote)

func (*LocalGitRepository) Pull added in v0.11.0

func (l *LocalGitRepository) Pull(verbose bool) (err error)

func (*LocalGitRepository) Push added in v0.11.0

func (l *LocalGitRepository) Push(verbose bool) (err error)

func (*LocalGitRepository) SetGitConfig added in v0.11.0

func (l *LocalGitRepository) SetGitConfig(options *GitConfigSetOptions) (err error)

func (*LocalGitRepository) SetGitConfigByGoGitConfig added in v0.11.0

func (l *LocalGitRepository) SetGitConfigByGoGitConfig(config *config.Config, verbose bool) (err error)

func (*LocalGitRepository) SetRemote added in v0.14.1

func (l *LocalGitRepository) SetRemote(remoteName string, remotUrl string, verbose bool) (remote *LocalGitRemote, err error)

type LogSettings added in v0.7.1

type LogSettings struct {
	ColorDisabled bool
}

func NewLogSettings added in v0.7.1

func NewLogSettings() (l *LogSettings)

func (*LogSettings) GetColorDisabled added in v0.7.1

func (l *LogSettings) GetColorDisabled() (colorDisabled bool)

func (*LogSettings) IsColorDisabled added in v0.7.1

func (l *LogSettings) IsColorDisabled() (colorDisabled bool)

func (*LogSettings) IsColorEnabled added in v0.7.1

func (l *LogSettings) IsColorEnabled() (colorEnabled bool)

func (*LogSettings) SetColorDisabled added in v0.7.1

func (l *LogSettings) SetColorDisabled(colorDisabled bool)

func (*LogSettings) SetColorEnabled added in v0.7.1

func (l *LogSettings) SetColorEnabled(colorEnabled bool)

type MathService added in v0.3.0

type MathService struct{}

func Math added in v0.3.0

func Math() (m *MathService)

func NewMathService added in v0.3.0

func NewMathService() (m *MathService)

func (*MathService) MaxInt added in v0.3.0

func (m *MathService) MaxInt(integers ...int) (maxValue int)

type ObjectStoreBucket added in v0.13.2

type ObjectStoreBucket interface {
	Exists() (exists bool, err error)
	MustExists() (exists bool)
}

type OsService added in v0.5.0

type OsService struct{}

func NewOsService added in v0.5.0

func NewOsService() (o *OsService)

func OS added in v0.5.0

func OS() (o *OsService)

func (*OsService) IsRunningOnWindows added in v0.5.0

func (o *OsService) IsRunningOnWindows() (isRunningOnWindows bool)

type PathsService

type PathsService struct{}

func NewPathsService

func NewPathsService() (p *PathsService)

func Paths

func Paths() (p *PathsService)

func (*PathsService) IsAbsolutePath

func (p *PathsService) IsAbsolutePath(path string) (isRelative bool)

Returns true if path is an absolute path. An empty string as path will always be false.

func (*PathsService) IsRelativePath

func (p *PathsService) IsRelativePath(path string) (isRelative bool)

Returns true if path is a relative path. An empty string as path will always be false.

type PointersService

type PointersService struct{}

func NewPointersService

func NewPointersService() (p *PointersService)

func Pointers

func Pointers() (pointers *PointersService)

func (*PointersService) IsPointer

func (p *PointersService) IsPointer(objectToTest interface{}) (isPointer bool)

type PowerShellService added in v0.7.0

type PowerShellService struct {
	CommandExecutorBase
}

func NewPowerShell added in v0.7.0

func NewPowerShell() (p *PowerShellService)

func NewPowerShellService added in v0.7.0

func NewPowerShellService() (p *PowerShellService)

func PowerShell added in v0.7.0

func PowerShell() (p *PowerShellService)

func (*PowerShellService) MustRunCommand added in v0.7.0

func (p *PowerShellService) MustRunCommand(options *RunCommandOptions) (commandOutput *CommandOutput)

func (*PowerShellService) MustRunOneLiner added in v0.10.0

func (p *PowerShellService) MustRunOneLiner(oneLiner string, verbose bool) (output *CommandOutput)

func (*PowerShellService) MustRunOneLinerAndGetStdoutAsString added in v0.10.0

func (p *PowerShellService) MustRunOneLinerAndGetStdoutAsString(oneLiner string, verbose bool) (stdout string)

func (*PowerShellService) RunCommand added in v0.7.0

func (b *PowerShellService) RunCommand(options *RunCommandOptions) (commandOutput *CommandOutput, err error)

func (*PowerShellService) RunOneLiner added in v0.10.0

func (p *PowerShellService) RunOneLiner(oneLiner string, verbose bool) (output *CommandOutput, err error)

func (*PowerShellService) RunOneLinerAndGetStdoutAsString added in v0.10.0

func (p *PowerShellService) RunOneLinerAndGetStdoutAsString(oneLiner string, verbose bool) (stdout string, err error)

type RunCommandOptions added in v0.4.0

type RunCommandOptions struct {
	Command            []string
	TimeoutString      string
	Verbose            bool
	AllowAllExitCodes  bool
	LiveOutputOnStdout bool

	// Run as "root" user (or Administrator on Windows):
	RunAsRoot bool
}

func NewRunCommandOptions added in v0.4.0

func NewRunCommandOptions() (runCommandOptions *RunCommandOptions)

func (*RunCommandOptions) GetAllowAllExitCodes added in v0.4.0

func (r *RunCommandOptions) GetAllowAllExitCodes() (allowAllExitCodes bool, err error)

func (*RunCommandOptions) GetCommand added in v0.4.0

func (o *RunCommandOptions) GetCommand() (command []string, err error)

func (*RunCommandOptions) GetDeepCopy added in v0.4.0

func (o *RunCommandOptions) GetDeepCopy() (deepCopy *RunCommandOptions)

func (*RunCommandOptions) GetJoinedCommand added in v0.4.0

func (o *RunCommandOptions) GetJoinedCommand() (joinedCommand string, err error)

func (*RunCommandOptions) GetLiveOutputOnStdout added in v0.4.0

func (r *RunCommandOptions) GetLiveOutputOnStdout() (liveOutputOnStdout bool, err error)

func (*RunCommandOptions) GetRunAsRoot added in v0.7.0

func (r *RunCommandOptions) GetRunAsRoot() (runAsRoot bool)

func (*RunCommandOptions) GetTimeoutSecondsAsString added in v0.4.0

func (o *RunCommandOptions) GetTimeoutSecondsAsString() (timeoutSeconds string, err error)

func (*RunCommandOptions) GetTimeoutString added in v0.4.0

func (r *RunCommandOptions) GetTimeoutString() (timeoutString string, err error)

func (*RunCommandOptions) GetVerbose added in v0.4.0

func (r *RunCommandOptions) GetVerbose() (verbose bool, err error)

func (*RunCommandOptions) IsTimeoutSet added in v0.4.0

func (o *RunCommandOptions) IsTimeoutSet() (isSet bool)

func (*RunCommandOptions) MustGetAllowAllExitCodes added in v0.4.0

func (r *RunCommandOptions) MustGetAllowAllExitCodes() (allowAllExitCodes bool)

func (*RunCommandOptions) MustGetCommand added in v0.4.0

func (r *RunCommandOptions) MustGetCommand() (command []string)

func (*RunCommandOptions) MustGetJoinedCommand added in v0.4.0

func (r *RunCommandOptions) MustGetJoinedCommand() (joinedCommand string)

func (*RunCommandOptions) MustGetLiveOutputOnStdout added in v0.4.0

func (r *RunCommandOptions) MustGetLiveOutputOnStdout() (liveOutputOnStdout bool)

func (*RunCommandOptions) MustGetTimeoutSecondsAsString added in v0.4.0

func (r *RunCommandOptions) MustGetTimeoutSecondsAsString() (timeoutSeconds string)

func (*RunCommandOptions) MustGetTimeoutString added in v0.4.0

func (r *RunCommandOptions) MustGetTimeoutString() (timeoutString string)

func (*RunCommandOptions) MustGetVerbose added in v0.4.0

func (r *RunCommandOptions) MustGetVerbose() (verbose bool)

func (*RunCommandOptions) MustSetAllowAllExitCodes added in v0.4.0

func (r *RunCommandOptions) MustSetAllowAllExitCodes(allowAllExitCodes bool)

func (*RunCommandOptions) MustSetCommand added in v0.4.0

func (r *RunCommandOptions) MustSetCommand(command []string)

func (*RunCommandOptions) MustSetLiveOutputOnStdout added in v0.4.0

func (r *RunCommandOptions) MustSetLiveOutputOnStdout(liveOutputOnStdout bool)

func (*RunCommandOptions) MustSetTimeoutString added in v0.4.0

func (r *RunCommandOptions) MustSetTimeoutString(timeoutString string)

func (*RunCommandOptions) MustSetVerbose added in v0.4.0

func (r *RunCommandOptions) MustSetVerbose(verbose bool)

func (*RunCommandOptions) SetAllowAllExitCodes added in v0.4.0

func (r *RunCommandOptions) SetAllowAllExitCodes(allowAllExitCodes bool) (err error)

func (*RunCommandOptions) SetCommand added in v0.4.0

func (r *RunCommandOptions) SetCommand(command []string) (err error)

func (*RunCommandOptions) SetLiveOutputOnStdout added in v0.4.0

func (r *RunCommandOptions) SetLiveOutputOnStdout(liveOutputOnStdout bool) (err error)

func (*RunCommandOptions) SetRunAsRoot added in v0.7.0

func (r *RunCommandOptions) SetRunAsRoot(runAsRoot bool)

func (*RunCommandOptions) SetTimeoutString added in v0.4.0

func (r *RunCommandOptions) SetTimeoutString(timeoutString string) (err error)

func (*RunCommandOptions) SetVerbose added in v0.4.0

func (r *RunCommandOptions) SetVerbose(verbose bool) (err error)

type ShellLineHandlerService added in v0.4.0

type ShellLineHandlerService struct {
}

func NewShellLineHandlerService added in v0.4.0

func NewShellLineHandlerService() (s *ShellLineHandlerService)

func ShellLineHandler added in v0.4.0

func ShellLineHandler() (shellLineHandler *ShellLineHandlerService)

func (*ShellLineHandlerService) Join added in v0.4.0

func (s *ShellLineHandlerService) Join(command []string) (joinedCommand string, err error)

func (*ShellLineHandlerService) MustJoin added in v0.4.0

func (s *ShellLineHandlerService) MustJoin(command []string) (joinedCommand string)

func (*ShellLineHandlerService) MustSplit added in v0.4.0

func (s *ShellLineHandlerService) MustSplit(command string) (splittedCommand []string)

func (*ShellLineHandlerService) Split added in v0.4.0

func (s *ShellLineHandlerService) Split(command string) (splittedCommand []string, err error)

type SlicesService added in v0.3.0

type SlicesService struct {
}

func NewSlicesService added in v0.3.0

func NewSlicesService() (s *SlicesService)

func Slices added in v0.3.0

func Slices() (slices *SlicesService)

func (*SlicesService) AddPrefixToEachString added in v0.3.0

func (s *SlicesService) AddPrefixToEachString(stringSlices []string, prefix string) (output []string)

func (*SlicesService) AddSuffixToEachString added in v0.3.0

func (s *SlicesService) AddSuffixToEachString(stringSlices []string, suffix string) (output []string)

func (*SlicesService) ContainsInt added in v0.3.0

func (s *SlicesService) ContainsInt(intSlice []int, intToSearch int) (containsInt bool)

func (*SlicesService) ContainsString added in v0.3.0

func (s *SlicesService) ContainsString(sliceOfStrings []string, toCheck string) (contains bool)

func (*SlicesService) GetDeepCopyOfStringsSlice added in v0.3.0

func (s *SlicesService) GetDeepCopyOfStringsSlice(sliceOfStrings []string) (deepCopy []string)

func (*SlicesService) GetIntSliceInitialized added in v0.3.0

func (s *SlicesService) GetIntSliceInitialized(nValues int, initValue int) (initializedSlice []int)

func (*SlicesService) GetIntSliceInitializedWithZeros added in v0.3.0

func (s *SlicesService) GetIntSliceInitializedWithZeros(nValues int) (initializedSlice []int)

func (*SlicesService) GetStringElementsNotInOtherSlice added in v0.3.0

func (s *SlicesService) GetStringElementsNotInOtherSlice(toCheck []string, other []string) (elementsNotInOther []string)

func (*SlicesService) MaxIntValuePerIndex added in v0.3.0

func (s *SlicesService) MaxIntValuePerIndex(intSlice1 []int, intSlice2 []int) (maxValues []int)

func (*SlicesService) MustRemoveStringsWhichContains added in v0.3.0

func (s *SlicesService) MustRemoveStringsWhichContains(sliceToRemoveStringsWhichContains []string, searchString string) (cleanedUpSlice []string)

func (*SlicesService) RemoveEmptyStrings added in v0.3.0

func (s *SlicesService) RemoveEmptyStrings(sliceOfStrings []string) (sliceOfStringsWithoutEmptyStrings []string)

func (*SlicesService) RemoveLastElementIfEmptyString added in v0.4.0

func (o *SlicesService) RemoveLastElementIfEmptyString(sliceOfStrings []string) (cleanedUp []string)

func (*SlicesService) RemoveMatchingStrings added in v0.3.0

func (s *SlicesService) RemoveMatchingStrings(sliceToRemoveMatching []string, matchingStringToRemove string) (cleanedUpSlice []string)

func (*SlicesService) RemoveStringEntryAtIndex added in v0.3.0

func (s *SlicesService) RemoveStringEntryAtIndex(elements []string, indexToRemove int) (elementsWithIndexRemoved []string)

func (*SlicesService) RemoveStringsWhichContains added in v0.3.0

func (s *SlicesService) RemoveStringsWhichContains(sliceToRemoveStringsWhichContains []string, searchString string) (cleanedUpSlice []string, err error)

func (*SlicesService) SortStringSlice added in v0.3.0

func (s *SlicesService) SortStringSlice(sliceOfStrings []string) (sorted []string)

func (*SlicesService) SortStringSliceAndRemoveEmpty added in v0.3.0

func (s *SlicesService) SortStringSliceAndRemoveEmpty(input []string) (sortedAndWithoutEmptyStrings []string)

func (*SlicesService) SortVersionStringSlice added in v0.3.0

func (s *SlicesService) SortVersionStringSlice(input []string) (sorted []string)

func (*SlicesService) SplitStrings added in v0.3.0

func (s *SlicesService) SplitStrings(input []string, splitAt string) (splitted []string)

func (*SlicesService) SplitStringsAndRemoveEmpty added in v0.3.0

func (s *SlicesService) SplitStringsAndRemoveEmpty(input []string, splitAt string) (splitted []string)

func (*SlicesService) ToLower added in v0.3.0

func (s *SlicesService) ToLower(input []string) (lower []string)

func (*SlicesService) TrimAllPrefix added in v0.3.0

func (o *SlicesService) TrimAllPrefix(sliceOfStrings []string, prefixToRemove string) (sliceOfStringsWithPrefixRemoved []string)

func (*SlicesService) TrimPrefix added in v0.3.0

func (s *SlicesService) TrimPrefix(sliceOfStrings []string, prefixToRemove string) (sliceOfStringsWithPrefixRemoved []string)

func (*SlicesService) TrimSpace added in v0.3.0

func (s *SlicesService) TrimSpace(toTrim []string) (trimmed []string)

type SpreadSheet added in v0.14.0

type SpreadSheet struct {
	TitleRow *SpreadSheetRow
	// contains filtered or unexported fields
}

func GetSpreadsheetWithNColumns added in v0.14.0

func GetSpreadsheetWithNColumns(nColumns int) (s *SpreadSheet, err error)

func MustGetSpreadsheetWithNColumns added in v0.14.0

func MustGetSpreadsheetWithNColumns(nColumns int) (s *SpreadSheet)

func NewSpreadSheet added in v0.14.0

func NewSpreadSheet() (s *SpreadSheet)

func (*SpreadSheet) AddRow added in v0.14.0

func (s *SpreadSheet) AddRow(rowEntries []string) (err error)

func (*SpreadSheet) GetCellValueAsString added in v0.14.0

func (s *SpreadSheet) GetCellValueAsString(rowIndex int, columnIndex int) (cellValue string, err error)

func (*SpreadSheet) GetColumnIndexByName added in v0.14.0

func (s *SpreadSheet) GetColumnIndexByName(columnName string) (columnIndex int, err error)

func (*SpreadSheet) GetColumnTitleAtIndexAsString added in v0.14.0

func (s *SpreadSheet) GetColumnTitleAtIndexAsString(index int) (title string, err error)

func (*SpreadSheet) GetColumnTitlesAsStringSlice added in v0.14.0

func (s *SpreadSheet) GetColumnTitlesAsStringSlice() (titles []string, err error)

func (*SpreadSheet) GetMaxColumnWidths added in v0.14.0

func (s *SpreadSheet) GetMaxColumnWidths() (columnWitdhs []int, err error)

func (*SpreadSheet) GetMinColumnWithsAsSelectedInOptions added in v0.14.0

func (s *SpreadSheet) GetMinColumnWithsAsSelectedInOptions(options *SpreadSheetRenderOptions) (columnWidths []int, err error)

func (*SpreadSheet) GetNumberOfColumns added in v0.14.0

func (s *SpreadSheet) GetNumberOfColumns() (nColumns int, err error)

func (*SpreadSheet) GetNumberOfRows added in v0.14.0

func (s *SpreadSheet) GetNumberOfRows() (nRows int, err error)

func (*SpreadSheet) GetRowByIndex added in v0.14.0

func (s *SpreadSheet) GetRowByIndex(rowIndex int) (row *SpreadSheetRow, err error)

func (*SpreadSheet) GetRows added in v0.14.0

func (s *SpreadSheet) GetRows() (rows []*SpreadSheetRow, err error)

func (*SpreadSheet) GetTitleRow added in v0.14.0

func (s *SpreadSheet) GetTitleRow() (TitleRow *SpreadSheetRow, err error)

func (*SpreadSheet) MustAddRow added in v0.14.0

func (s *SpreadSheet) MustAddRow(rowEntries []string)

func (*SpreadSheet) MustGetCellValueAsString added in v0.14.0

func (s *SpreadSheet) MustGetCellValueAsString(rowIndex int, columnIndex int) (cellValue string)

func (*SpreadSheet) MustGetColumnIndexByName added in v0.14.0

func (s *SpreadSheet) MustGetColumnIndexByName(columnName string) (columnIndex int)

func (*SpreadSheet) MustGetColumnTitleAtIndexAsString added in v0.14.0

func (s *SpreadSheet) MustGetColumnTitleAtIndexAsString(index int) (title string)

func (*SpreadSheet) MustGetColumnTitlesAsStringSlice added in v0.14.0

func (s *SpreadSheet) MustGetColumnTitlesAsStringSlice() (titles []string)

func (*SpreadSheet) MustGetMaxColumnWidths added in v0.14.0

func (s *SpreadSheet) MustGetMaxColumnWidths() (columnWitdhs []int)

func (*SpreadSheet) MustGetMinColumnWithsAsSelectedInOptions added in v0.14.0

func (s *SpreadSheet) MustGetMinColumnWithsAsSelectedInOptions(options *SpreadSheetRenderOptions) (columnWidths []int)

func (*SpreadSheet) MustGetNumberOfColumns added in v0.14.0

func (s *SpreadSheet) MustGetNumberOfColumns() (nColumns int)

func (*SpreadSheet) MustGetNumberOfRows added in v0.14.0

func (s *SpreadSheet) MustGetNumberOfRows() (nRows int)

func (*SpreadSheet) MustGetRowByIndex added in v0.14.0

func (s *SpreadSheet) MustGetRowByIndex(rowIndex int) (row *SpreadSheetRow)

func (*SpreadSheet) MustGetRows added in v0.14.0

func (s *SpreadSheet) MustGetRows() (rows []*SpreadSheetRow)

func (*SpreadSheet) MustGetTitleRow added in v0.14.0

func (s *SpreadSheet) MustGetTitleRow() (TitleRow *SpreadSheetRow)

func (*SpreadSheet) MustPrintAsString added in v0.14.0

func (s *SpreadSheet) MustPrintAsString(options *SpreadSheetRenderOptions)

func (*SpreadSheet) MustRemoveColumnByIndex added in v0.14.0

func (s *SpreadSheet) MustRemoveColumnByIndex(columnIndex int)

func (*SpreadSheet) MustRemoveColumnByName added in v0.14.0

func (s *SpreadSheet) MustRemoveColumnByName(columnName string)

func (*SpreadSheet) MustRenderAsString added in v0.14.0

func (s *SpreadSheet) MustRenderAsString(options *SpreadSheetRenderOptions) (rendered string)

func (*SpreadSheet) MustRenderTitleRowAsString added in v0.14.0

func (s *SpreadSheet) MustRenderTitleRowAsString(options *SpreadSheetRenderRowOptions) (rendered string)

func (*SpreadSheet) MustRenderToStdout added in v0.14.5

func (s *SpreadSheet) MustRenderToStdout(options *SpreadSheetRenderOptions)

func (*SpreadSheet) MustSetColumnTitles added in v0.14.0

func (s *SpreadSheet) MustSetColumnTitles(titles []string)

func (*SpreadSheet) MustSetRows added in v0.14.0

func (s *SpreadSheet) MustSetRows(rows []*SpreadSheetRow)

func (*SpreadSheet) MustSetTitleRow added in v0.14.0

func (s *SpreadSheet) MustSetTitleRow(TitleRow *SpreadSheetRow)

func (*SpreadSheet) MustSortByColumnByName added in v0.14.0

func (s *SpreadSheet) MustSortByColumnByName(columnName string)

func (*SpreadSheet) PrintAsString added in v0.14.0

func (s *SpreadSheet) PrintAsString(options *SpreadSheetRenderOptions) (err error)

func (*SpreadSheet) RemoveColumnByIndex added in v0.14.0

func (s *SpreadSheet) RemoveColumnByIndex(columnIndex int) (err error)

func (*SpreadSheet) RemoveColumnByName added in v0.14.0

func (s *SpreadSheet) RemoveColumnByName(columnName string) (err error)

func (*SpreadSheet) RenderAsString added in v0.14.0

func (s *SpreadSheet) RenderAsString(options *SpreadSheetRenderOptions) (rendered string, err error)

func (*SpreadSheet) RenderTitleRowAsString added in v0.14.0

func (s *SpreadSheet) RenderTitleRowAsString(options *SpreadSheetRenderRowOptions) (rendered string, err error)

func (*SpreadSheet) RenderToStdout added in v0.14.5

func (s *SpreadSheet) RenderToStdout(options *SpreadSheetRenderOptions) (err error)

func (*SpreadSheet) SetColumnTitles added in v0.14.0

func (s *SpreadSheet) SetColumnTitles(titles []string) (err error)

func (*SpreadSheet) SetRows added in v0.14.0

func (s *SpreadSheet) SetRows(rows []*SpreadSheetRow) (err error)

func (*SpreadSheet) SetTitleRow added in v0.14.0

func (s *SpreadSheet) SetTitleRow(TitleRow *SpreadSheetRow) (err error)

func (*SpreadSheet) SortByColumnByName added in v0.14.0

func (s *SpreadSheet) SortByColumnByName(columnName string) (err error)

type SpreadSheetRenderOptions added in v0.14.0

type SpreadSheetRenderOptions struct {
	SkipTitle                 bool
	StringDelimiter           string
	Verbose                   bool
	SameColumnWidthForAllRows bool
}

func NewSpreadSheetRenderOptions added in v0.14.0

func NewSpreadSheetRenderOptions() (s *SpreadSheetRenderOptions)

func (*SpreadSheetRenderOptions) GetSameColumnWidthForAllRows added in v0.14.0

func (s *SpreadSheetRenderOptions) GetSameColumnWidthForAllRows() (sameColumnWidthForAllRows bool, err error)

func (*SpreadSheetRenderOptions) GetSkipTitle added in v0.14.0

func (s *SpreadSheetRenderOptions) GetSkipTitle() (skipTitle bool, err error)

func (*SpreadSheetRenderOptions) GetStringDelimiter added in v0.14.0

func (s *SpreadSheetRenderOptions) GetStringDelimiter() (stringDelimiter string, err error)

func (*SpreadSheetRenderOptions) GetVerbose added in v0.14.0

func (s *SpreadSheetRenderOptions) GetVerbose() (verbose bool, err error)

func (*SpreadSheetRenderOptions) MustGetSameColumnWidthForAllRows added in v0.14.0

func (s *SpreadSheetRenderOptions) MustGetSameColumnWidthForAllRows() (sameColumnWidthForAllRows bool)

func (*SpreadSheetRenderOptions) MustGetSkipTitle added in v0.14.0

func (s *SpreadSheetRenderOptions) MustGetSkipTitle() (skipTitle bool)

func (*SpreadSheetRenderOptions) MustGetStringDelimiter added in v0.14.0

func (s *SpreadSheetRenderOptions) MustGetStringDelimiter() (stringDelimiter string)

func (*SpreadSheetRenderOptions) MustGetVerbose added in v0.14.0

func (s *SpreadSheetRenderOptions) MustGetVerbose() (verbose bool)

func (*SpreadSheetRenderOptions) MustSetSameColumnWidthForAllRows added in v0.14.0

func (s *SpreadSheetRenderOptions) MustSetSameColumnWidthForAllRows(sameColumnWidthForAllRows bool)

func (*SpreadSheetRenderOptions) MustSetSkipTitle added in v0.14.0

func (s *SpreadSheetRenderOptions) MustSetSkipTitle(skipTitle bool)

func (*SpreadSheetRenderOptions) MustSetStringDelimiter added in v0.14.0

func (s *SpreadSheetRenderOptions) MustSetStringDelimiter(stringDelimiter string)

func (*SpreadSheetRenderOptions) MustSetVerbose added in v0.14.0

func (s *SpreadSheetRenderOptions) MustSetVerbose(verbose bool)

func (*SpreadSheetRenderOptions) SetSameColumnWidthForAllRows added in v0.14.0

func (s *SpreadSheetRenderOptions) SetSameColumnWidthForAllRows(sameColumnWidthForAllRows bool) (err error)

func (*SpreadSheetRenderOptions) SetSkipTitle added in v0.14.0

func (s *SpreadSheetRenderOptions) SetSkipTitle(skipTitle bool) (err error)

func (*SpreadSheetRenderOptions) SetStringDelimiter added in v0.14.0

func (s *SpreadSheetRenderOptions) SetStringDelimiter(stringDelimiter string) (err error)

func (*SpreadSheetRenderOptions) SetVerbose added in v0.14.0

func (s *SpreadSheetRenderOptions) SetVerbose(verbose bool) (err error)

type SpreadSheetRenderRowOptions added in v0.14.0

type SpreadSheetRenderRowOptions struct {
	MinColumnWidths []int
	StringDelimiter string
	Verbose         bool
}

func NewSpreadSheetRenderRowOptions added in v0.14.0

func NewSpreadSheetRenderRowOptions() (s *SpreadSheetRenderRowOptions)

func (*SpreadSheetRenderRowOptions) GetMinColumnWidths added in v0.14.0

func (s *SpreadSheetRenderRowOptions) GetMinColumnWidths() (minColumnWidths []int, err error)

func (*SpreadSheetRenderRowOptions) GetStringDelimiter added in v0.14.0

func (s *SpreadSheetRenderRowOptions) GetStringDelimiter() (stringDelimiter string, err error)

func (*SpreadSheetRenderRowOptions) GetVerbose added in v0.14.0

func (s *SpreadSheetRenderRowOptions) GetVerbose() (verbose bool, err error)

func (*SpreadSheetRenderRowOptions) IsMinColumnWidthsSet added in v0.14.0

func (s *SpreadSheetRenderRowOptions) IsMinColumnWidthsSet() (isSet bool)

func (*SpreadSheetRenderRowOptions) IsStringDelimiterSet added in v0.14.0

func (s *SpreadSheetRenderRowOptions) IsStringDelimiterSet() (isSet bool)

func (*SpreadSheetRenderRowOptions) MustGetMinColumnWidths added in v0.14.0

func (s *SpreadSheetRenderRowOptions) MustGetMinColumnWidths() (minColumnWidths []int)

func (*SpreadSheetRenderRowOptions) MustGetStringDelimiter added in v0.14.0

func (s *SpreadSheetRenderRowOptions) MustGetStringDelimiter() (stringDelimiter string)

func (*SpreadSheetRenderRowOptions) MustGetVerbose added in v0.14.0

func (s *SpreadSheetRenderRowOptions) MustGetVerbose() (verbose bool)

func (*SpreadSheetRenderRowOptions) MustSetMinColumnWidths added in v0.14.0

func (s *SpreadSheetRenderRowOptions) MustSetMinColumnWidths(minColumnWidths []int)

func (*SpreadSheetRenderRowOptions) MustSetStringDelimiter added in v0.14.0

func (s *SpreadSheetRenderRowOptions) MustSetStringDelimiter(stringDelimiter string)

func (*SpreadSheetRenderRowOptions) MustSetVerbose added in v0.14.0

func (s *SpreadSheetRenderRowOptions) MustSetVerbose(verbose bool)

func (*SpreadSheetRenderRowOptions) SetMinColumnWidths added in v0.14.0

func (s *SpreadSheetRenderRowOptions) SetMinColumnWidths(minColumnWidths []int) (err error)

func (*SpreadSheetRenderRowOptions) SetStringDelimiter added in v0.14.0

func (s *SpreadSheetRenderRowOptions) SetStringDelimiter(stringDelimiter string) (err error)

func (*SpreadSheetRenderRowOptions) SetVerbose added in v0.14.0

func (s *SpreadSheetRenderRowOptions) SetVerbose(verbose bool) (err error)

type SpreadSheetRow added in v0.14.0

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

func NewSpreadSheetRow added in v0.14.0

func NewSpreadSheetRow() (s *SpreadSheetRow)

func (*SpreadSheetRow) GetColumnValueAsString added in v0.14.0

func (s *SpreadSheetRow) GetColumnValueAsString(columnIndex int) (columnValue string, err error)

func (*SpreadSheetRow) GetColumnWidths added in v0.14.0

func (s *SpreadSheetRow) GetColumnWidths() (columnWidths []int, err error)

func (*SpreadSheetRow) GetEntries added in v0.14.0

func (s *SpreadSheetRow) GetEntries() (entries []string, err error)

func (*SpreadSheetRow) GetNumberOfEntries added in v0.14.0

func (s *SpreadSheetRow) GetNumberOfEntries() (nEntries int, err error)

func (*SpreadSheetRow) MustGetColumnValueAsString added in v0.14.0

func (s *SpreadSheetRow) MustGetColumnValueAsString(columnIndex int) (columnValue string)

func (*SpreadSheetRow) MustGetColumnWidths added in v0.14.0

func (s *SpreadSheetRow) MustGetColumnWidths() (columnWidths []int)

func (*SpreadSheetRow) MustGetEntries added in v0.14.0

func (s *SpreadSheetRow) MustGetEntries() (entries []string)

func (*SpreadSheetRow) MustGetNumberOfEntries added in v0.14.0

func (s *SpreadSheetRow) MustGetNumberOfEntries() (nEntries int)

func (*SpreadSheetRow) MustRemoveElementAtIndex added in v0.14.0

func (s *SpreadSheetRow) MustRemoveElementAtIndex(index int)

func (*SpreadSheetRow) MustRenderAsString added in v0.14.0

func (s *SpreadSheetRow) MustRenderAsString(options *SpreadSheetRenderRowOptions) (rendered string)

func (*SpreadSheetRow) MustSetEntries added in v0.14.0

func (s *SpreadSheetRow) MustSetEntries(entries []string)

func (*SpreadSheetRow) RemoveElementAtIndex added in v0.14.0

func (s *SpreadSheetRow) RemoveElementAtIndex(index int) (err error)

func (*SpreadSheetRow) RenderAsString added in v0.14.0

func (s *SpreadSheetRow) RenderAsString(options *SpreadSheetRenderRowOptions) (rendered string, err error)

func (*SpreadSheetRow) SetEntries added in v0.14.0

func (s *SpreadSheetRow) SetEntries(entries []string) (err error)

type StringsService added in v0.3.0

type StringsService struct{}

func NewStringsService added in v0.3.0

func NewStringsService() (s *StringsService)

func Strings added in v0.3.0

func Strings() (stringsService *StringsService)

func (*StringsService) ContainsAtLeastOneSubstring added in v0.3.0

func (s *StringsService) ContainsAtLeastOneSubstring(input string, substrings []string) (atLeastOneSubstringFound bool)

func (*StringsService) ContainsAtLeastOneSubstringIgnoreCase added in v0.3.0

func (s *StringsService) ContainsAtLeastOneSubstringIgnoreCase(input string, substring []string) (atLeastOneSubstringFound bool)

func (*StringsService) ContainsCommentOnly added in v0.3.0

func (s *StringsService) ContainsCommentOnly(input string) (containsCommentOnly bool)

func (*StringsService) ContainsIgnoreCase added in v0.12.0

func (s *StringsService) ContainsIgnoreCase(input string, substring string) (contains bool)

func (*StringsService) CountLines added in v0.3.0

func (s *StringsService) CountLines(input string) (nLines int)

func (*StringsService) EnsureEndsWithExactlyOneLineBreak added in v0.3.0

func (s *StringsService) EnsureEndsWithExactlyOneLineBreak(input string) (ensuredLineBreak string)

func (*StringsService) EnsureEndsWithLineBreak added in v0.3.0

func (s *StringsService) EnsureEndsWithLineBreak(input string) (ensuredLineBreak string)

func (*StringsService) EnsureFirstCharLowercase added in v0.3.0

func (s *StringsService) EnsureFirstCharLowercase(input string) (firstCharUppercase string)

func (*StringsService) EnsureFirstCharUppercase added in v0.3.0

func (s *StringsService) EnsureFirstCharUppercase(input string) (firstCharUppercase string)

func (*StringsService) EnsureSuffix added in v0.3.0

func (s *StringsService) EnsureSuffix(input string, suffix string) (ensuredSuffix string)

func (*StringsService) FirstCharToUpper added in v0.3.0

func (s *StringsService) FirstCharToUpper(input string) (output string)

func (*StringsService) GetFirstLine added in v0.3.0

func (s *StringsService) GetFirstLine(input string) (firstLine string)

func (*StringsService) GetFirstLineAndTrimSpace added in v0.3.0

func (s *StringsService) GetFirstLineAndTrimSpace(input string) (firstLine string)

func (*StringsService) GetFirstLineWithoutCommentAndTrimSpace added in v0.3.0

func (s *StringsService) GetFirstLineWithoutCommentAndTrimSpace(input string) (firstLine string)

func (*StringsService) GetNumberOfLinesWithPrefix added in v0.3.0

func (s *StringsService) GetNumberOfLinesWithPrefix(content string, prefix string, trimLines bool) (numberOfLinesWithPrefix int)

func (*StringsService) HasAtLeastOnePrefix added in v0.3.0

func (s *StringsService) HasAtLeastOnePrefix(toCheck string, prefixes []string) (hasPrefix bool)

func (*StringsService) HasPrefixIgnoreCase added in v0.3.0

func (s *StringsService) HasPrefixIgnoreCase(input string, prefix string) (hasPrefix bool)

func (*StringsService) IsComment added in v0.3.0

func (s *StringsService) IsComment(input string) (isComment bool)

func (*StringsService) IsFirstCharLowerCase added in v0.3.0

func (s *StringsService) IsFirstCharLowerCase(input string) (isFirstCharLowerCase bool)

func (*StringsService) IsFirstCharUpperCase added in v0.3.0

func (s *StringsService) IsFirstCharUpperCase(input string) (isFirstCharUpperCase bool)

func (*StringsService) RemoveCommentMarkers added in v0.3.0

func (s *StringsService) RemoveCommentMarkers(input string) (commentContent string)

func (*StringsService) RemoveCommentMarkersAndTrimSpace added in v0.3.0

func (s *StringsService) RemoveCommentMarkersAndTrimSpace(input string) (commentContent string)

func (*StringsService) RemoveComments added in v0.3.0

func (s *StringsService) RemoveComments(input string) (contentWithoutComments string)

func (*StringsService) RemoveCommentsAndTrimSpace added in v0.3.0

func (s *StringsService) RemoveCommentsAndTrimSpace(input string) (output string)

func (*StringsService) RemoveSurroundingQuotationMarks added in v0.3.0

func (s *StringsService) RemoveSurroundingQuotationMarks(input string) (output string)

func (*StringsService) RemoveTailingNewline added in v0.3.0

func (s *StringsService) RemoveTailingNewline(input string) (cleaned string)

func (*StringsService) RepeatReplaceAll added in v0.3.0

func (s *StringsService) RepeatReplaceAll(input string, search string, replaceWith string) (replaced string)

func (*StringsService) RightFillWithSpaces added in v0.3.0

func (s *StringsService) RightFillWithSpaces(input string, fillLength int) (filled string)

func (*StringsService) SplitAtSpacesAndRemoveEmptyStrings added in v0.3.0

func (s *StringsService) SplitAtSpacesAndRemoveEmptyStrings(input string) (splitted []string)

func (*StringsService) SplitFirstLineAndContent added in v0.3.0

func (s *StringsService) SplitFirstLineAndContent(input string) (firstLine string, contentWithoutFirstLine string)

func (*StringsService) SplitLines added in v0.3.0

func (s *StringsService) SplitLines(input string) (splittedLines []string)

func (*StringsService) SplitWords added in v0.3.0

func (s *StringsService) SplitWords(input string) (words []string)

func (*StringsService) ToPascalCase added in v0.3.0

func (s *StringsService) ToPascalCase(input string) (pascalCase string)

func (*StringsService) ToSnakeCase added in v0.3.0

func (s *StringsService) ToSnakeCase(input string) (snakeCase string)

func (*StringsService) TrimAllPrefix added in v0.3.0

func (s *StringsService) TrimAllPrefix(stringToCheck string, prefixToRemove string) (trimmedString string)

func (*StringsService) TrimAllSuffix added in v0.3.0

func (s *StringsService) TrimAllSuffix(stringToCheck string, suffixToRemove string) (trimmedString string)

func (*StringsService) TrimPrefixIgnoreCase added in v0.3.0

func (s *StringsService) TrimPrefixIgnoreCase(input string, prefix string) (trimmed string)

func (*StringsService) TrimSpaceForEveryLine added in v0.3.0

func (s *StringsService) TrimSpaceForEveryLine(input string) (trimmedForEveryLine string)

func (*StringsService) TrimSpacesLeft added in v0.3.0

func (s *StringsService) TrimSpacesLeft(input string) (trimmedLeft string)

func (*StringsService) TrimSuffixAndSpace added in v0.3.0

func (s *StringsService) TrimSuffixAndSpace(input string, suffix string) (output string)

func (*StringsService) TrimSuffixUntilAbsent added in v0.3.0

func (s *StringsService) TrimSuffixUntilAbsent(input string, suffixToRemove string) (withoutSuffix string)

type StructsService

type StructsService struct{}

func NewStructsService

func NewStructsService() (s *StructsService)

func Structs

func Structs() (structs *StructsService)

func (*StructsService) GetFieldValuesAsString

func (s *StructsService) GetFieldValuesAsString(structToGetFieldsFrom interface{}) (values []string, err error)

func (*StructsService) IsPointerToStruct

func (s *StructsService) IsPointerToStruct(objectToTest interface{}) (isStruct bool)

func (*StructsService) IsStruct

func (s *StructsService) IsStruct(objectToTest interface{}) (isStruct bool)

func (*StructsService) IsStructOrPointerToStruct

func (s *StructsService) IsStructOrPointerToStruct(objectToTest interface{}) (isStruct bool)

func (*StructsService) MustGetFieldValuesAsString

func (s *StructsService) MustGetFieldValuesAsString(structToGetFieldsFrom interface{}) (values []string)

type TcpPortsService added in v0.8.0

type TcpPortsService struct{}

func NewTcpPortsService added in v0.8.0

func NewTcpPortsService() (t *TcpPortsService)

func TcpPorts added in v0.8.0

func TcpPorts() (t *TcpPortsService)

func (*TcpPortsService) IsPortOpen added in v0.8.0

func (t *TcpPortsService) IsPortOpen(hostnameOrIp string, port int, verbose bool) (isOpen bool, err error)

Check if a TCP port on the given hostnameOrIp with given portNumber is open. The evaluation is done by opening a TCP socket and close it again.

func (*TcpPortsService) MustIsPortOpen added in v0.8.0

func (t *TcpPortsService) MustIsPortOpen(hostnameOrIp string, port int, verbose bool) (isOpen bool)

type TemporaryDirectoriesService added in v0.6.0

type TemporaryDirectoriesService struct {
}

func NewTemporaryDirectoriesService added in v0.6.0

func NewTemporaryDirectoriesService() (t *TemporaryDirectoriesService)

func TemporaryDirectories added in v0.6.0

func TemporaryDirectories() (TemporaryDirectorys *TemporaryDirectoriesService)

func (*TemporaryDirectoriesService) CreateEmptyTemporaryDirectory added in v0.6.0

func (t *TemporaryDirectoriesService) CreateEmptyTemporaryDirectory(verbose bool) (temporaryDirectory *LocalDirectory, err error)

func (*TemporaryDirectoriesService) CreateEmptyTemporaryDirectoryAndGetPath added in v0.6.0

func (t *TemporaryDirectoriesService) CreateEmptyTemporaryDirectoryAndGetPath(verbose bool) (TemporaryDirectoryPath string, err error)

func (*TemporaryDirectoriesService) MustCreateEmptyTemporaryDirectory added in v0.6.0

func (t *TemporaryDirectoriesService) MustCreateEmptyTemporaryDirectory(verbose bool) (temporaryDirectory *LocalDirectory)

func (*TemporaryDirectoriesService) MustCreateEmptyTemporaryDirectoryAndGetPath added in v0.6.0

func (t *TemporaryDirectoriesService) MustCreateEmptyTemporaryDirectoryAndGetPath(verbose bool) (TemporaryDirectoryPath string)

type TemporaryFilesService added in v0.1.3

type TemporaryFilesService struct {
}

func NewTemporaryFilesService added in v0.1.3

func NewTemporaryFilesService() (t *TemporaryFilesService)

func TemporaryFiles added in v0.1.3

func TemporaryFiles() (temporaryFiles *TemporaryFilesService)

func (*TemporaryFilesService) CreateEmptyTemporaryFile added in v0.1.3

func (t *TemporaryFilesService) CreateEmptyTemporaryFile(verbose bool) (temporaryfile File, err error)

func (*TemporaryFilesService) CreateEmptyTemporaryFileAndGetPath added in v0.1.3

func (t *TemporaryFilesService) CreateEmptyTemporaryFileAndGetPath(verbose bool) (temporaryFilePath string, err error)

func (*TemporaryFilesService) CreateFromString added in v0.1.3

func (t *TemporaryFilesService) CreateFromString(content string, verbose bool) (temporaryFile File, err error)

func (*TemporaryFilesService) CreateNamedTemporaryFile added in v0.14.8

func (t *TemporaryFilesService) CreateNamedTemporaryFile(fileName string, verbose bool) (temporaryfile File, err error)

func (*TemporaryFilesService) CreateTemporaryFileFromBytes added in v0.14.8

func (t *TemporaryFilesService) CreateTemporaryFileFromBytes(content []byte, verbose bool) (temporaryFile File, err error)

func (*TemporaryFilesService) CreateTemporaryFileFromFile added in v0.14.8

func (t *TemporaryFilesService) CreateTemporaryFileFromFile(fileToCopyAsTemporaryFile File, verbose bool) (temporaryFile File, err error)

func (*TemporaryFilesService) CreateTemporaryFileFromString added in v0.14.8

func (t *TemporaryFilesService) CreateTemporaryFileFromString(content string, verbose bool) (temporaryFile File, err error)

func (*TemporaryFilesService) MustCreateEmptyTemporaryFile added in v0.1.3

func (t *TemporaryFilesService) MustCreateEmptyTemporaryFile(verbose bool) (temporaryfile File)

func (*TemporaryFilesService) MustCreateEmptyTemporaryFileAndGetPath added in v0.1.3

func (t *TemporaryFilesService) MustCreateEmptyTemporaryFileAndGetPath(verbose bool) (temporaryFilePath string)

func (*TemporaryFilesService) MustCreateFromString added in v0.1.3

func (t *TemporaryFilesService) MustCreateFromString(content string, verbose bool) (temporaryFile File)

func (*TemporaryFilesService) MustCreateNamedTemporaryFile added in v0.14.8

func (t *TemporaryFilesService) MustCreateNamedTemporaryFile(fileName string, verbose bool) (temporaryfile File)

func (*TemporaryFilesService) MustCreateTemporaryFileFromBytes added in v0.14.8

func (t *TemporaryFilesService) MustCreateTemporaryFileFromBytes(content []byte, verbose bool) (temporaryFile File)

func (*TemporaryFilesService) MustCreateTemporaryFileFromFile added in v0.14.8

func (t *TemporaryFilesService) MustCreateTemporaryFileFromFile(fileToCopyAsTemporaryFile File, verbose bool) (temporaryFile File)

func (*TemporaryFilesService) MustCreateTemporaryFileFromString added in v0.14.8

func (t *TemporaryFilesService) MustCreateTemporaryFileFromString(content string, verbose bool) (temporaryFile File)

type TerminalColorsService

type TerminalColorsService struct{}

func NewTerminalColorsService

func NewTerminalColorsService() (t *TerminalColorsService)

func TerminalColors

func TerminalColors() (terminalColors *TerminalColorsService)

func (*TerminalColorsService) GetCodeBlack

func (t *TerminalColorsService) GetCodeBlack() (code string)

func (*TerminalColorsService) GetCodeBlue

func (t *TerminalColorsService) GetCodeBlue() (code string)

func (*TerminalColorsService) GetCodeBrightBlack

func (t *TerminalColorsService) GetCodeBrightBlack() (code string)

func (*TerminalColorsService) GetCodeBrightBlue

func (t *TerminalColorsService) GetCodeBrightBlue() (code string)

func (*TerminalColorsService) GetCodeBrightCyan

func (t *TerminalColorsService) GetCodeBrightCyan() (code string)

func (*TerminalColorsService) GetCodeBrightGreen

func (t *TerminalColorsService) GetCodeBrightGreen() (code string)

func (*TerminalColorsService) GetCodeBrightMagenta

func (t *TerminalColorsService) GetCodeBrightMagenta() (code string)

func (*TerminalColorsService) GetCodeBrightRed

func (t *TerminalColorsService) GetCodeBrightRed() (code string)

func (*TerminalColorsService) GetCodeBrightWhite

func (t *TerminalColorsService) GetCodeBrightWhite() (code string)

func (*TerminalColorsService) GetCodeBrightYellow

func (t *TerminalColorsService) GetCodeBrightYellow() (code string)

func (*TerminalColorsService) GetCodeCyan

func (t *TerminalColorsService) GetCodeCyan() (code string)

func (*TerminalColorsService) GetCodeGray

func (t *TerminalColorsService) GetCodeGray() (code string)

func (*TerminalColorsService) GetCodeGreen

func (t *TerminalColorsService) GetCodeGreen() (code string)

func (*TerminalColorsService) GetCodeMangenta

func (t *TerminalColorsService) GetCodeMangenta() (code string)

func (*TerminalColorsService) GetCodeNoColor

func (t *TerminalColorsService) GetCodeNoColor() (code string)

func (*TerminalColorsService) GetCodeRed

func (t *TerminalColorsService) GetCodeRed() (code string)

func (*TerminalColorsService) GetCodeWhite

func (t *TerminalColorsService) GetCodeWhite() (code string)

func (*TerminalColorsService) GetCodeYellow

func (t *TerminalColorsService) GetCodeYellow() (code string)

type TestsService

type TestsService struct{}

func NewTestsService

func NewTestsService() (t *TestsService)

func Tests

func Tests() (tests *TestsService)

func (*TestsService) FormatAsTestname

func (t *TestsService) FormatAsTestname(objectToFormat interface{}) (testname string, err error)

func (*TestsService) MustFormatAsTestname

func (t *TestsService) MustFormatAsTestname(objectToFormat interface{}) (testname string)

type TicToc added in v0.2.0

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

func MustTic added in v0.2.0

func MustTic(title string, verbose bool) (t *TicToc)

func NewTicToc added in v0.2.0

func NewTicToc() (t *TicToc)

func Tic added in v0.2.0

func Tic(title string, verbose bool) (t *TicToc, err error)

func TicWithoutTitle added in v0.2.0

func TicWithoutTitle(verbose bool) (t *TicToc)

func (*TicToc) GetTStart added in v0.2.0

func (t *TicToc) GetTStart() (tStart *time.Time, err error)

func (*TicToc) GetTitle added in v0.2.0

func (t *TicToc) GetTitle() (title string, err error)

func (*TicToc) GetTitleOrDefaultIfUnset added in v0.2.0

func (t *TicToc) GetTitleOrDefaultIfUnset() (title string)

func (*TicToc) MustGetTStart added in v0.2.0

func (t *TicToc) MustGetTStart() (tStart *time.Time)

func (*TicToc) MustGetTitle added in v0.2.0

func (t *TicToc) MustGetTitle() (title string)

func (*TicToc) MustSetTStart added in v0.2.0

func (t *TicToc) MustSetTStart(tStart *time.Time)

func (*TicToc) MustSetTitle added in v0.2.0

func (t *TicToc) MustSetTitle(title string)

func (*TicToc) MustToc added in v0.2.0

func (t *TicToc) MustToc(verbose bool) (elapsedTime *time.Duration)

func (*TicToc) SetTStart added in v0.2.0

func (t *TicToc) SetTStart(tStart *time.Time) (err error)

func (*TicToc) SetTitle added in v0.2.0

func (t *TicToc) SetTitle(title string) (err error)

func (*TicToc) Start added in v0.2.0

func (t *TicToc) Start(verbose bool)

func (*TicToc) Toc added in v0.2.0

func (t *TicToc) Toc(verbose bool) (elapsedTime *time.Duration, err error)

type TimeService added in v0.9.0

type TimeService struct{}

func NewTimeService added in v0.9.0

func NewTimeService() (t *TimeService)

func Time added in v0.9.0

func Time() (t *TimeService)

func (*TimeService) GetCurrentTimeAsSortableString added in v0.9.0

func (t *TimeService) GetCurrentTimeAsSortableString() (currentTime string)

type TracedErrorType

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

func NewTracedErrorType

func NewTracedErrorType() (t *TracedErrorType)

func (TracedErrorType) Error

func (t TracedErrorType) Error() (errorMessage string)

func (*TracedErrorType) GetErrorsToUnwrap

func (t *TracedErrorType) GetErrorsToUnwrap() (errorsToUnwrap []error, err error)

func (*TracedErrorType) GetFormattedError

func (t *TracedErrorType) GetFormattedError() (formattedError error, err error)

func (*TracedErrorType) GetFunctionCalls

func (t *TracedErrorType) GetFunctionCalls() (functionCalls []string, err error)

func (*TracedErrorType) MustGetErrorsToUnwrap

func (t *TracedErrorType) MustGetErrorsToUnwrap() (errorsToUnwrap []error)

func (*TracedErrorType) MustGetFormattedError

func (t *TracedErrorType) MustGetFormattedError() (formattedError error)

func (*TracedErrorType) MustGetFunctionCalls

func (t *TracedErrorType) MustGetFunctionCalls() (functionCalls []string)

func (*TracedErrorType) MustSetErrorsToUnwrap

func (t *TracedErrorType) MustSetErrorsToUnwrap(errorsToUnwrap []error)

func (*TracedErrorType) MustSetFormattedError

func (t *TracedErrorType) MustSetFormattedError(formattedError error)

func (*TracedErrorType) MustSetFunctionCalls

func (t *TracedErrorType) MustSetFunctionCalls(functionCalls []string)

func (*TracedErrorType) SetErrorsToUnwrap

func (t *TracedErrorType) SetErrorsToUnwrap(errorsToUnwrap []error) (err error)

func (*TracedErrorType) SetFormattedError

func (t *TracedErrorType) SetFormattedError(formattedError error) (err error)

func (*TracedErrorType) SetFunctionCalls

func (t *TracedErrorType) SetFunctionCalls(functionCalls []string) (err error)

func (TracedErrorType) Unwrap

func (t TracedErrorType) Unwrap() (errors []error)

type UTF16Service added in v0.5.0

type UTF16Service struct{}

func NewUTF16Service added in v0.5.0

func NewUTF16Service() (u *UTF16Service)

func UTF16 added in v0.5.0

func UTF16() (u *UTF16Service)

func (*UTF16Service) DecodeAsBytes added in v0.5.0

func (u *UTF16Service) DecodeAsBytes(utf16 []byte) (decoded []byte, err error)

func (*UTF16Service) DecodeAsString added in v0.5.0

func (u *UTF16Service) DecodeAsString(utf16 []byte) (decoded string, err error)

func (*UTF16Service) MustDecodeAsBytes added in v0.5.0

func (u *UTF16Service) MustDecodeAsBytes(utf16 []byte) (decoded []byte)

func (*UTF16Service) MustDecodeAsString added in v0.5.0

func (u *UTF16Service) MustDecodeAsString(utf16 []byte) (decoded string)

type UsersService added in v0.9.0

type UsersService struct {
}

func NewUsersService added in v0.9.0

func NewUsersService() (u *UsersService)

func Users added in v0.9.0

func Users() (u *UsersService)

func (*UsersService) GetHomeDirectory added in v0.9.0

func (u *UsersService) GetHomeDirectory() (homeDir Directory, err error)

func (*UsersService) GetHomeDirectoryAsString added in v0.9.0

func (u *UsersService) GetHomeDirectoryAsString() (homeDirPath string, err error)

func (*UsersService) MustGetHomeDirectory added in v0.9.0

func (u *UsersService) MustGetHomeDirectory() (homeDir Directory)

func (*UsersService) MustGetHomeDirectoryAsString added in v0.9.0

func (u *UsersService) MustGetHomeDirectoryAsString() (homeDirPath string)

type WindowsService added in v0.5.0

type WindowsService struct{}

func NewWindowsService added in v0.5.0

func NewWindowsService() (w *WindowsService)

func Windows added in v0.5.0

func Windows() (w *WindowsService)

Provides Windows (the operating system) related functions.

func (*WindowsService) DecodeAsBytes added in v0.5.0

func (w *WindowsService) DecodeAsBytes(windowsUtf16 []byte) (decoded []byte, err error)

func (*WindowsService) DecodeAsString added in v0.5.0

func (w *WindowsService) DecodeAsString(windowsUtf16 []byte) (decoded string, err error)

func (*WindowsService) DecodeStringAsString added in v0.5.0

func (w *WindowsService) DecodeStringAsString(windowsUtf16 string) (decoded string, err error)

func (*WindowsService) IsRunningOnWindows added in v0.5.0

func (w *WindowsService) IsRunningOnWindows() (isRunningOnWindows bool)

func (*WindowsService) MustDecodeAsBytes added in v0.5.0

func (w *WindowsService) MustDecodeAsBytes(windowsUtf16 []byte) (decoded []byte)

func (*WindowsService) MustDecodeAsString added in v0.5.0

func (w *WindowsService) MustDecodeAsString(windowsUtf16 []byte) (decoded string)

func (*WindowsService) MustDecodeStringAsString added in v0.5.0

func (w *WindowsService) MustDecodeStringAsString(windowsUtf16 string) (decoded string)

Jump to

Keyboard shortcuts

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