meifamily/ptt-alertor

View on GitHub
myutil/path.go

Summary

Maintainability
A
0 mins
Test Coverage
package myutil

import "os"

func ProjectRootPath() string {
    dir, err := os.Getwd()
    if err != nil {
        panic(err)
    }
    return dir
}

func StoragePath() string {
    return ProjectRootPath() + "/storage"
}

func PublicPath() string {
    return ProjectRootPath() + "/public"
}