INNER CODE UNIT · Go

stripTrailingSlashes

offen/docker-volume-backup · cmd/backup/archive.go:41

func stripTrailingSlashes(path string) string {
	if len(path) > 0 && path[len(path)-1] == '/' {
		path = path[0 : len(path)-1]
	}

	return path
}

func makeAbsolute(inputFilePath, outputFilePath string) (string, string, error) {
	inputFilePath, err := filepath.Abs(inputFilePath)
	if err == nil {
		outputFilePath, err = filepath.Abs(outputFilePath)
	}

	return inputFilePath, outputFilePath, err
}

func compress(paths []string, outFilePath, algo string, concurrency int) error {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…