...

Source file src/github.com/spf13/viper/internal/testutil/filepath.go

Documentation: github.com/spf13/viper/internal/testutil

     1  package testutil
     2  
     3  import (
     4  	"path/filepath"
     5  	"testing"
     6  )
     7  
     8  // AbsFilePath calls filepath.Abs on path.
     9  func AbsFilePath(t *testing.T, path string) string {
    10  	t.Helper()
    11  
    12  	s, err := filepath.Abs(path)
    13  	if err != nil {
    14  		t.Fatal(err)
    15  	}
    16  
    17  	return s
    18  }
    19  

View as plain text