gopath

package module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2021 License: LGPL-3.0 Imports: 7 Imported by: 1

README

gopath

Find out full package name of folder by probing for go.mod

Example

...
import (
  "gitlab.com/akabio/gopath"
  "fmt"
)
...
p, _ := gopath.Find("../test/foo/bar")
fmt.Println(p) // gitlab.com/akabio/test/foo/bar
...

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Find

func Find(p string) (string, error)

Find will return the full package name of the provided folder.

func RelativePath added in v0.2.0

func RelativePath(p string) (string, error)

RelativePath will return the relative path from the module root by probing for go.mod.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL