Documentation ¶
Index ¶
- func ContainsInt(s []int, e int) bool
- func ContainsString(s []string, e string) bool
- func Copy(src, dst string) (int64, error)
- func FileExists(filename string) (bool, error)
- func PersistReportsAndLinks(stepName, workspace string, reports, links []Path)
- func Prefix(in []string, prefix string) []string
- func PrefixIfNeeded(in []string, prefix string) []string
- func SplitAndTrim(in []string, separator string) (out []string)
- func Trim(in []string) (out []string)
- func Unzip(src, dest string) ([]string, error)
- type FileUtils
- type Files
- func (f Files) Copy(src, dst string) (int64, error)
- func (f Files) FileExists(filename string) (bool, error)
- func (f Files) FileRead(path string) ([]byte, error)
- func (f Files) FileWrite(path string, content []byte, perm os.FileMode) error
- func (f Files) MkdirAll(path string, perm os.FileMode) error
- type Path
- type ProjectStructure
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsInt ¶ added in v1.11.0
ContainsInt check whether the element is part of the slice
func ContainsString ¶ added in v1.24.0
ContainsString check whether the element is part of the slice
func FileExists ¶
FileExists returns true if the file system entry for the given path exists and is not a directory.
func PersistReportsAndLinks ¶ added in v1.11.0
PersistReportsAndLinks stores the report paths and links in JSON format in the workspace for processing outside
func PrefixIfNeeded ¶ added in v1.22.0
PrefixIfNeeded adds a prefix to each element of the slice if not already prefixed
func SplitAndTrim ¶ added in v1.25.0
SplitAndTrim iterates over the strings in the given slice and splits each on the provided separator. Each resulting sub-string is then a separate entry in the returned array.
func Trim ¶ added in v1.19.0
Trim removes dangling whitespaces from each element of the slice, empty elements are dropped
func Unzip ¶ added in v1.19.0
Unzip will decompress a zip archive, moving all files and folders within the zip file (parameter 1) to an output directory (parameter 2). from https://golangcode.com/unzip-files-in-go/ with the following license: MIT License
Copyright (c) 2017 Edd Turtle ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Types ¶
type FileUtils ¶ added in v1.15.0
type FileUtils interface { FileExists(filename string) (bool, error) Copy(src, dest string) (int64, error) FileRead(path string) ([]byte, error) FileWrite(path string, content []byte, perm os.FileMode) error MkdirAll(path string, perm os.FileMode) error }
FileUtils ...
type Files ¶ added in v1.15.0
type Files struct { }
Files ...
func (Files) FileExists ¶ added in v1.15.0
FileExists returns true if the file system entry for the given path exists and is not a directory.
type Path ¶ added in v1.11.0
type Path struct { Name string `json:"name"` Target string `json:"target"` Mandatory bool `json:"mandatory"` Scope string `json:"scope"` }
Path - struct to serialize paths and some metadata back to the invoker
type ProjectStructure ¶ added in v1.14.0
type ProjectStructure struct {
// contains filtered or unexported fields
}
ProjectStructure describes a directory containing source code
func (*ProjectStructure) UsesMaven ¶ added in v1.14.0
func (projectStructure *ProjectStructure) UsesMaven() bool
UsesMaven returns `true` if the project structure directory contains a pom.xml file, false otherwise
func (*ProjectStructure) UsesMta ¶ added in v1.14.0
func (projectStructure *ProjectStructure) UsesMta() bool
UsesMta returns `true` if the project structure directory contains typical files for mta projects (mta.yaml, mta.yml), `false` otherwise
func (*ProjectStructure) UsesNpm ¶ added in v1.14.0
func (projectStructure *ProjectStructure) UsesNpm() bool
UsesNpm returns `true` if the project structure directory contains a package.json file, false otherwise