Example #1
0
func _warnChangeStopper(logy *log.Logger, items []*Change, perItemPrefix, fmt_ string, args ...interface{}) {
	logy.LogErrf(fmt_, args...)
	for _, item := range items {
		if item != nil {
			fileId := ""
			if item.Src != nil && item.Src.Id != "" {
				fileId = item.Src.Id
			} else if item.Dest != nil && item.Dest.Id != "" {
				fileId = item.Dest.Id
			}

			logy.LogErrln(perItemPrefix, item.Path, fileId)
		}
	}
}
Example #2
0
func warnConflictsPersist(logy *log.Logger, conflicts []*Change) {
	logy.LogErrf("These %d file(s) would be overwritten. Use -%s to override this behaviour\n", len(conflicts), CLIOptionIgnoreConflict)
	for _, conflict := range conflicts {
		logy.LogErrln(conflict.Path)
	}
}