Documentation
¶
Index ¶
- Constants
- Variables
- func CheckDisabled() bool
- func Kill(tempFile, targetFile string)
- type BuildArguments
- type BuildServerEnvironment
- type CIDetected
- type EnvReader
- type LaunchResult
- type Logger
- type OsSettings
- type PriceModel
- type ResolvedTool
- type ToolDefinition
- type ToolKind
- type Tools
- func (t *Tools) AddResolvedToolAtStart(tool *ResolvedTool)
- func (t *Tools) AddTool(name string, autoRefresh bool, isMdi bool, supportsText bool, ...) (*ResolvedTool, bool)
- func (t *Tools) TryFind(kind ToolKind) (tool *ResolvedTool, found bool)
- func (t *Tools) TryFindByPath(path string) (tool *ResolvedTool, found bool)
- func (t *Tools) TryFindForExtension(extension string) (tool *ResolvedTool, found bool)
- type TryResolveTool
Constants ¶
const ( //Detected a Continuous Integration environment Detected = CIDetected(true) //NotDetected a Continuous Integration environment NotDetected = CIDetected(false) )
Variables ¶
var AllDefinedTools = []*ToolDefinition{
defineBeyondCompare(),
defineAraxisMerge(),
defineCodeCompare(),
defineDeltaWalker(),
defineDiffinity(),
defineDiffMerge(),
defineExamDiff(),
defineGuiffy(),
defineKaleidoscope(),
defineKDiff3(),
defineMeld(),
defineNeovim(),
defineP4MergeImage(),
defineP4MergeText(),
defineGoland(),
defineSublimeMerge(),
defineTkDiff(),
defineTortoiseGitMerge(),
defineTortoiseDiff(),
defineTortoiseMerge(),
defineVim(),
defineVsCode(),
defineWinMerge(),
}
AllDefinedTools definition of all supported diff tools
Functions ¶
func CheckDisabled ¶
func CheckDisabled() bool
Types ¶
type BuildArguments ¶
BuildArguments a function to build arguments to launch a diff tool
type BuildServerEnvironment ¶
type BuildServerEnvironment string
BuildServerEnvironment environment variable or lookup key to detect CI environment
const ( //Appveyor build environment Appveyor BuildServerEnvironment = "CI" //Jenkins build environment Jenkins BuildServerEnvironment = "JENKINS_URL" //GitHub actions build environment GitHub BuildServerEnvironment = "GITHUB_ACTION" //AzureDevOps build environment AzureDevOps BuildServerEnvironment = "AGENT_ID" //TeamCity build environment TeamCity BuildServerEnvironment = "TEAMCITY_VERSION" //MyGet build environment MyGet BuildServerEnvironment = "BuildRunner" //GitLab build environment GitLab BuildServerEnvironment = "GITLAB_CI" )
type CIDetected ¶
type CIDetected bool
CIDetected result of detection of Continuous Integration check
func CheckCI ¶
func CheckCI() CIDetected
CheckCI checks for Continuous Integration environment being present
type LaunchResult ¶
type LaunchResult int
LaunchResult result of the launch operation of the diff tool
const ( //NoLaunchResult no result specified NoLaunchResult LaunchResult = iota //NoEmptyFileForExtension when no empty file can be created for the diff tool NoEmptyFileForExtension //AlreadyRunningAndSupportsRefresh the diff tool is already running and supports auto refresh AlreadyRunningAndSupportsRefresh //StartedNewInstance a new instance of the diff tool can be created StartedNewInstance //TooManyRunningDiffTools too many instance of the diff tool is running TooManyRunningDiffTools //NoDiffToolFound no diff tool was found on the machine NoDiffToolFound //Disabled diff tools are disabled Disabled )
type OsSettings ¶
type OsSettings struct { TargetLeftArguments BuildArguments TargetRightArguments BuildArguments ExePaths []string }
OsSettings provides path to the diff file and require arguments for the launch
func NewOsSettings ¶
func NewOsSettings( targetLeftArguments BuildArguments, targetRightArguments BuildArguments, exePaths []string) *OsSettings
NewOsSettings creates a new instance of OsSettings
type PriceModel ¶
type PriceModel string
PriceModel of the detected diff tool
const ( //Paid diff tool Paid PriceModel = "Paid" //Free diff tool Free PriceModel = "Free" //Donation free with donation options Donation PriceModel = "Free with option to donate" //Sponsor free with ability to sponsor Sponsor PriceModel = "Free with option to sponsor" )
type ResolvedTool ¶
type ResolvedTool struct { Name string Kind ToolKind ExePath string RightArguments BuildArguments LeftArguments BuildArguments IsMdi bool AutoRefresh bool BinaryExtensions []string RequiresTarget bool SupportsText bool }
ResolvedTool contains information about a found diff tool
type ToolDefinition ¶
type ToolDefinition struct { Kind ToolKind Url string AutoRefresh bool IsMdi bool Windows OsSettings Linux OsSettings Osx OsSettings BinaryExtensions []string Cost PriceModel Notes string SupportsText bool RequiresTarget bool }
ToolDefinition specifies attributes of a diff tool
type ToolKind ¶
type ToolKind string
ToolKind specifies the kind of the diff tool detected
const ( //None no tool None ToolKind = "" //BeyondCompare diff tool BeyondCompare ToolKind = "BeyondCompare" //P4MergeText diff tool P4MergeText ToolKind = "P4MergeText" //P4MergeImage diff tool P4MergeImage ToolKind = "P4MergeImage" //AraxisMerge diff tool AraxisMerge ToolKind = "AraxisMerge" //Meld diff tool Meld ToolKind = "Meld" //SublimeMerge diff tool SublimeMerge ToolKind = "SublimeMerge" //Kaleidoscope diff tool Kaleidoscope ToolKind = "Kaleidoscope" //CodeCompare diff tool CodeCompare ToolKind = "CodeCompare" //DeltaWalker diff tool DeltaWalker ToolKind = "DeltaWalker" //WinMerge diff tool WinMerge ToolKind = "WinMerge" //DiffMerge diff tool DiffMerge ToolKind = "DiffMerge" //TortoiseMerge diff tool TortoiseMerge ToolKind = "TortoiseMerge" //TortoiseGitMerge diff tool TortoiseGitMerge ToolKind = "TortoiseGitMerge" //TortoiseIDiff diff tool TortoiseIDiff ToolKind = "TortoiseIDiff" //KDiff3 diff tool KDiff3 ToolKind = "KDiff3" //TkDiff diff tool TkDiff ToolKind = "TkDiff" //Guiffy diff tool Guiffy ToolKind = "Guiffy" //ExamDiff diff tool ExamDiff ToolKind = "ExamDiff" //Diffinity diff tool Diffinity ToolKind = "Diffinity" //VisualStudioCode diff tool VisualStudioCode ToolKind = "VisualStudioCode" //GoLand diff tool GoLand ToolKind = "GoLand" //Vim diff tool Vim ToolKind = "Vim" //Neovim diff tool Neovim ToolKind = "Neovim" )
type Tools ¶
type Tools struct {
// contains filtered or unexported fields
}
func (*Tools) AddResolvedToolAtStart ¶
func (t *Tools) AddResolvedToolAtStart(tool *ResolvedTool)
func (*Tools) AddTool ¶
func (t *Tools) AddTool(name string, autoRefresh bool, isMdi bool, supportsText bool, requiresTarget bool, targetLeftArguments BuildArguments, targetRightArguments BuildArguments, exePath string, binaryExtensions []string) (*ResolvedTool, bool)
func (*Tools) TryFind ¶
func (t *Tools) TryFind(kind ToolKind) (tool *ResolvedTool, found bool)
TryFind finds a tool by the provided kind
func (*Tools) TryFindByPath ¶
func (t *Tools) TryFindByPath(path string) (tool *ResolvedTool, found bool)
TryFindByPath finds a tool by the provided path
func (*Tools) TryFindForExtension ¶
func (t *Tools) TryFindForExtension(extension string) (tool *ResolvedTool, found bool)
TryFindForExtension finds a tool based on the provided extension
type TryResolveTool ¶
type TryResolveTool func() (resolved *ResolvedTool, found bool)
TryResolveTool a function that possibly finds a diff tool
Source Files
¶
- counter.go
- definition_araxismerge.go
- definition_beyondcompare.go
- definition_codecompare.go
- definition_deltawalker.go
- definition_diffinity.go
- definition_diffmerge.go
- definition_examdiff.go
- definition_goland.go
- definition_guiffy.go
- definition_kaleidoscope.go
- definition_kdiff3.go
- definition_meld.go
- definition_neovim.go
- definition_p4merge.go
- definition_sublimemerge.go
- definition_tkdiff.go
- definition_tortoisediff.go
- definition_tortoisegitmerge.go
- definition_tortoisemerge.go
- definition_vim.go
- definition_vscode.go
- definition_winmerge.go
- definitions.go
- detector.go
- finder.go
- interface.go
- logger.go
- ossettings.go
- process.go
- resolvedtool.go
- runner.go
- target.go
- tool.go