Documentation
¶
Index ¶
- Constants
- func Diff(a, b string) (result string)
- func HasPrefix(filename string, prefixes []string) bool
- func IsURL(str string) bool
- func Read(filename, workingDir string) (data []byte, err error)
- func ReadFromFile(file string) (data []byte, err error)
- func ReadFromURL(file string) (data []byte, err error)
- func Show(content string) (result string)
- func WriteToFile(content string, filename string) (err error)
- type File
- func (f *File) Condition(source string) (bool, error)
- func (f *File) ConditionFromSCM(source string, scm scm.Scm) (bool, error)
- func (f *File) Source(workingDir string) (string, error)
- func (f *File) Target(source string, dryRun bool) (changed bool, err error)
- func (f *File) TargetFromSCM(source string, scm scm.Scm, dryRun bool) (changed bool, files []string, message string, err error)
- type Line
Constants ¶
const ( //ErrLineNotFound is the error message when no matching line found ErrLineNotFound string = "line not found" )
Variables ¶
This section is empty.
Functions ¶
func Read ¶
Read read file from a location then return an array of byte. The location accepts multiple input http/https urls "https://", file url "file://", or a simple file
func ReadFromFile ¶
ReadFromFile read a file then return its data as an array of byte.
func ReadFromURL ¶
ReadFromURL read a file form a http/https url then return its data as an array of byte.
func WriteToFile ¶
WriteToFile write a string to a file
Types ¶
type File ¶
File defines the resource file that can be configured from an updatecli configuration
func (*File) Condition ¶
Condition test if a file content match the content provided via configuration. If the configuration doesn't specify a value then it fall back to the source output
func (*File) ConditionFromSCM ¶
ConditionFromSCM test if a file content from SCM match the content provided via configuration. If the configuration doesn't specify a value then it fall back to the source output
type Line ¶
Line hold rule that define if a specific line should be included or excluded
func (*Line) ContainsExcluded ¶
ContainsExcluded return a content without excluded lines
func (*Line) ContainsIncluded ¶
ContainsIncluded return a content with only matching lines