github.com/fibonacci1729/draft@v0.3.0/pkg/draft/draftpath/home.go (about) 1 package draftpath 2 3 import ( 4 "path/filepath" 5 ) 6 7 // Home describes the location of a CLI configuration. 8 // 9 // This helper builds paths relative to a Draft Home directory. 10 type Home string 11 12 // String returns Home as a string. 13 // 14 // Implements fmt.Stringer. 15 func (h Home) String() string { 16 return string(h) 17 } 18 19 // Packs returns the path to the Draft starter packs. 20 func (h Home) Packs() string { 21 return filepath.Join(string(h), "packs") 22 } 23 24 // Plugins returns the path to the Draft plugins. 25 func (h Home) Plugins() string { 26 return filepath.Join(string(h), "plugins") 27 }