Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfigPath = filepath.Join(lo.Must1(os.UserHomeDir()), ".config", "go-cli")
nolint: gochecknoglobals
Functions ¶
func Package2url ¶ added in v1.1.17
func Walk ¶ added in v1.1.11
Example ¶
ExampleWalk is an example function.
package main import ( "embed" "fmt" "io/fs" "github.com/xuender/go-cli/tpl" ) //go:embed files var _files embed.FS // ExampleWalk is an example function. func main() { err := tpl.Walk(_files, ".", func(path string, entry fs.DirEntry) error { fmt.Println(path, entry.Name()) return nil }) fmt.Println(err) }
Output: files/a/aa aaa files/b bb files c <nil>
func WriteTemplate ¶ added in v1.1.11
Types ¶
type DirEntry ¶ added in v1.1.11
type DirEntry struct {
// contains filtered or unexported fields
}
func NewDirEntry ¶ added in v1.1.11
Click to show internal directories.
Click to hide internal directories.