github.com/pbberlin/tools@v0.0.0-20160910141205-7aa5421c2169/os/fsi/dsfs/0_init.go (about) 1 package dsfs 2 3 import ( 4 "fmt" 5 "io" 6 "os" 7 8 "github.com/pbberlin/tools/os/fsi" 9 ) 10 11 // the usual short notations for fmt.Printf and fmt.Sprintf 12 var pf func(format string, a ...interface{}) (int, error) = fmt.Printf 13 var pfRestore func(format string, a ...interface{}) (int, error) = fmt.Printf 14 var spf func(format string, a ...interface{}) string = fmt.Sprintf 15 var wpf func(w io.Writer, format string, a ...interface{}) (int, error) = fmt.Fprintf 16 17 const ( 18 tdir = "fsd" // datastory entity type for filesystem directory 19 tdirsep = tdir + "," // nested datastore keys each have this prefix 20 tfil = "fsf" // datastory entity type for filesystem file 21 sep = "/" // no, package path does not provide it; yes, we do need it. 22 ) 23 24 func init() { 25 26 // forcing our implementations 27 // to comply with our interfaces 28 29 f := DsFile{} 30 ifa := fsi.File(&f) 31 _ = ifa 32 33 ifi := os.FileInfo(&f) 34 _ = ifi 35 36 fs := dsFileSys{} 37 ifs := fsi.FileSystem(&fs) 38 _ = ifs 39 40 }