Codebase list golang-github-vbatts-go-mtree / e9c91572-fbfa-47cf-bc70-c15effeb0253/upstream test / realpath.go
e9c91572-fbfa-47cf-bc70-c15effeb0253/upstream

Tree @e9c91572-fbfa-47cf-bc70-c15effeb0253/upstream (Download .tar.gz)

realpath.go @e9c91572-fbfa-47cf-bc70-c15effeb0253/upstreamraw · 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)
	}
}