Documentation
¶
Index ¶
- Constants
- func CheckUntrackedFiles(fileName string) ([]string, int, error)
- func GetAllDiff(commitAmount uint) (string, error)
- func GetLockfilesFromDiff(lockfileDiffFile *diffparser.DiffFile) (string, string)
- func GetPrevCommitHash() (string, error)
- func GetRootFile(lockfilePath string, rootFileName string) (string, error)
- func GetSingleDiff(filePath string, commitAmount uint) (string, error)
- func IndexOf(slice []string, find string) int
- func Log(fileName string, diff string, override bool) error
- func RenderHumanReadable(diffList *[]Diff) string
- func RenderJSON(diffList *[]Diff) (string, error)
- type AbsentFieldDiff
- type DependencyDiff
- func MakeAddedDependencyDiff(pkgName string, version string, parent string) DependencyDiff
- func MakeAddedSubDependencyDiff(pkgName string, parent string, version string) DependencyDiff
- func MakeModifiedSubDependencyDiff(pkgName string, parent string) DependencyDiff
- func MakeRemovedDependencyDiff(pkgName string) DependencyDiff
- func MakeRemovedSubDependencyDiff(pkgName, parent string) DependencyDiff
- type Diff
- type DiffMetaType
- type DiffType
- type FieldDiff
- type LockFileType
Constants ¶
View Source
const ENTRY_SEPARATOR string = "----------------------------------------------------------------------------------------------------"
Variables ¶
This section is empty.
Functions ¶
func GetAllDiff ¶
func GetLockfilesFromDiff ¶
func GetLockfilesFromDiff(lockfileDiffFile *diffparser.DiffFile) (string, string)
func GetPrevCommitHash ¶
func RenderHumanReadable ¶
func RenderJSON ¶
Types ¶
type AbsentFieldDiff ¶
type AbsentFieldDiff struct {
Type DiffType `json:"type"`
MetaType DiffMetaType `json:"meta_type"`
Name string `json:"dependency_name"`
Field string `json:"field"`
}
func MakeAbsentFieldDiff ¶
func MakeAbsentFieldDiff(pkgName string, field string) AbsentFieldDiff
func (AbsentFieldDiff) GetName ¶
func (diff AbsentFieldDiff) GetName() string
func (AbsentFieldDiff) GetType ¶
func (diff AbsentFieldDiff) GetType() DiffType
func (AbsentFieldDiff) RenderHumanReadable ¶
func (diff AbsentFieldDiff) RenderHumanReadable() string
type DependencyDiff ¶
type DependencyDiff struct {
Type DiffType `json:"type"`
MetaType DiffMetaType `json:"meta_type"`
Name string `json:"dependency_name"`
Parent string `json:"parent"`
Version string `json:"version,omitempty"`
}
func MakeAddedDependencyDiff ¶
func MakeAddedDependencyDiff(pkgName string, version string, parent string) DependencyDiff
func MakeAddedSubDependencyDiff ¶
func MakeAddedSubDependencyDiff(pkgName string, parent string, version string) DependencyDiff
func MakeModifiedSubDependencyDiff ¶
func MakeModifiedSubDependencyDiff(pkgName string, parent string) DependencyDiff
func MakeRemovedDependencyDiff ¶
func MakeRemovedDependencyDiff(pkgName string) DependencyDiff
func MakeRemovedSubDependencyDiff ¶
func MakeRemovedSubDependencyDiff(pkgName, parent string) DependencyDiff
func (DependencyDiff) GetName ¶
func (diff DependencyDiff) GetName() string
func (DependencyDiff) GetType ¶
func (diff DependencyDiff) GetType() DiffType
func (DependencyDiff) RenderHumanReadable ¶
func (diff DependencyDiff) RenderHumanReadable() string
type DiffMetaType ¶
type DiffMetaType string
const ( DEPENDENCY DiffMetaType = "dependency" SUB_DEPENDENCY DiffMetaType = "sub-dependency" FIELD DiffMetaType = "field" )
type FieldDiff ¶
type FieldDiff struct {
Type DiffType `json:"type"`
MetaType DiffMetaType `json:"meta_type"`
Name string `json:"dependency_name"`
Field string `json:"field"`
OldValue string `json:"old_value"`
NewValue string `json:"new_value"`
}
func MakeDependencyFieldDiff ¶
func (FieldDiff) RenderHumanReadable ¶
type LockFileType ¶
func GetLockfileType ¶
func GetLockfileType(lockfileType string) (LockFileType, error)
Click to show internal directories.
Click to hide internal directories.