Add directory query
This commit is contained in:
parent
a495091b01
commit
53b4d4702c
4
file.go
4
file.go
@ -99,6 +99,10 @@ func (f *file) Path() string {
|
||||
return f.path
|
||||
}
|
||||
|
||||
func (f *file) Dir() string {
|
||||
return path.Dir(f.path)
|
||||
}
|
||||
|
||||
func (f *file) Value(key string) (interface{}, bool) {
|
||||
value, ok := f.Meta[key]
|
||||
return value, ok
|
||||
|
@ -40,6 +40,7 @@ func Begin(srcDir string) Goldsmith {
|
||||
|
||||
type File interface {
|
||||
Path() string
|
||||
Dir() string
|
||||
|
||||
Value(key string) (interface{}, bool)
|
||||
SetValue(key string, value interface{})
|
||||
|
Loading…
Reference in New Issue
Block a user