github.com/petergtz/pegomock@v2.9.1-0.20230424204322-eb0e044013df+incompatible/pegomock/package_name.go (about)

     1  package main
     2  
     3  import (
     4  	"path/filepath"
     5  	"strings"
     6  )
     7  
     8  func DeterminePackageNameIn(dir string) (string, error) {
     9  	return strings.Replace(filepath.Base(dir), "-", "_", -1) + "_test", nil
    10  }