Categorygithub.com/getgauge/common
modulepackage
0.0.0-20250301053926-ba211b864d31
Repository: https://github.com/getgauge/common.git
Documentation: pkg.go.dev

# README

common

Contributor Covenant

This is a shared utility code between components written in Golang.

Prerequisite

Golang

License

common is released under the Apache License, Version 2.0. See LICENSE for the full license text.

Copyright

Copyright 2015 ThoughtWorks, Inc.

# Functions

AppendProperties appends the given properties to the end of the properties file.
Appends contents of source file to destination file.
CopyFile creates a copy of source file to destination file.
DirExists checks if the given directory exists.
ExecutableName returns the Gauge executable name based on user's OS.
ExecuteCommand executes the given command in the working directory.
ExecuteCommandWithEnv executes command after setting the given environment.
ExecuteSystemCommand executes the given system command in the working directory.
FileExists checks if the given file exists.
FindFilesInDir returns a list of files for which isValidFile func returns true.
GetConfigurationPrefix returns the configuration directory prefix $GAUGE_HOME or $home/.gauge/config.
GetDefaultPropertiesFile returns the path of the default.properties file in the default env.
GetDirInProject returns the path of a particular directory in a Gauge project.
GetExecutableCommand returns the path of the executable file.
GetGaugeConfiguration parsed the gauge.properties file from GAUGE_HOME and returns the contents.
GetGaugeConfiguration parsed the given properties file from GAUGE_HOME and returns the contents.
GetGaugeHomeDirectory returns GAUGE_HOME.
GetGaugePluginVersion returns the latest version installed of the given plugin.
GetInstallationPrefix returns the installation directory prefix /usr or /usr/local.
GetPluginInstallPrefixes returns the installation prefix path for the plugins.
GetPluginProperties returns the properties of the given plugin.
GetPluginsInstallDir returns the plugin installation directory.
GetPrimaryPluginsInstallDir returns the primary plugin installation dir.
GetProjectRoot returns the Gauge project root A project root is where a manifest.json files exists this routine keeps going upwards searching for manifest.json.
GetProjectRootFromSpecPath returns the path of the project root from a given spec path.
GetSkeletonFilePath returns the path skeleton file.
GetTempDir returns the system temp directory.
GetUniqueID returns a unique id for the proto messages.
IsPluginInstalled checks if the given Gauge plugin version is installed.
MirrorDir creates an exact copy of source dir to destination dir Modified version of bradfitz's camlistore (https://github.com/bradfitz/camlistore/blob/master/make.go).
MirrorFile creates an exact copy of source file to destination file Modified version of bradfitz's camlistore (https://github.com/bradfitz/camlistore/blob/master/make.go).
ReadFileContents returns the contents of the file.
Remove removes all the files and directories recursively for the given path.
SaveFile saves contents at the given filepath.
SetEnvVariable is a wrapper around os.SetEnv to set env variable.
SubDirectoryExists checks if a dir for given plugin exists in the plugin directory.
TrimTrailingSpace trims the trailing spaces in the given string.
UnzipArchive extract the zip file to destination directory.
UrlExists checks if the given url exists.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
specify the debug options to be used while launching the runner.
specifies the plugin installation path if installs to non-standard location.
No description provided by the author
user specifies this to use a specific port.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

Property represents a single property in the properties file.