Codebase list golang-github-vbatts-go-mtree / d6c4f9ab-5369-4702-b585-c222d94815c3/main test / realpath.go
d6c4f9ab-5369-4702-b585-c222d94815c3/main

Tree @d6c4f9ab-5369-4702-b585-c222d94815c3/main (Download .tar.gz)

realpath.go @d6c4f9ab-5369-4702-b585-c222d94815c3/mainraw · history · blame

// +build ignore

package main

import (
	"flag"
	"fmt"
	"os"
	"path/filepath"
)

func main() {
	flag.Parse()
	for _, arg := range flag.Args() {
		path, err := filepath.Abs(arg)
		if err != nil {
			fmt.Fprint(os.Stderr, err)
			os.Exit(1)
		}
		fmt.Printf("%s", path)
	}
}