gopathresolver

package module
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2025 License: BSD-2-Clause Imports: 6 Imported by: 9

README

GO Path Resolver

This package provides support for resolve full path (absolute path) according several conditions.

Get

go get github.com/helviojunior/gopathresolver@v0

Usage


import (
    "fmt"

    resolver "github.com/helviojunior/gopathresolver"
)

file := "~/teste.md"
if resolvedPath, err := resolver.ResolveFullPath(file); err != nil {
    panic(err)
}

fmt.Println("Resolved path: ", resolvedPath)

Test

go test -v .

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PathSeparator = string(os.PathSeparator)

Functions

func IsValid

func IsValid(fp string) bool

func IsValidAndNotExists

func IsValidAndNotExists(fp string) (bool, error)

func ResolveFullPath

func ResolveFullPath(file_path string) (string, error)

func ResolveRelativePath added in v0.1.1

func ResolveRelativePath(base_path string, full_path string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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