Skip to content
Snippets Groups Projects
Commit 75a2da28 authored by Hugo Hörnquist's avatar Hugo Hörnquist
Browse files

Remove File prefix.

parent 7b62d1ab
No related branches found
No related tags found
No related merge requests found
......@@ -71,7 +71,7 @@ func (d HostClasses) Lookup(ctx context.Context, name string) (fs.Node, error) {
func (d Host) Lookup(ctx context.Context, name string) (fs.Node, error) {
switch name {
case "data":
return file.DataFile{d.hostname}, nil
return file.Data{d.hostname}, nil
case "classes":
return HostClasses{d.hostname}, nil
}
......
......@@ -7,12 +7,12 @@ import (
"git.lysator.liu.se/hugo/foremanFS/fetch"
)
type DataFile struct {
type Data struct {
// record ResultRecord
Hostname string
}
func (f DataFile) Attr(ctx context.Context, a *fuse.Attr) error {
func (f Data) Attr(ctx context.Context, a *fuse.Attr) error {
a.Inode = 0
a.Mode = 0o444
// a.Size = uint64(len(fmt.Sprintf("%+v\n", f.record)))
......@@ -21,6 +21,6 @@ func (f DataFile) Attr(ctx context.Context, a *fuse.Attr) error {
return nil
}
func (f DataFile) ReadAll(ctx context.Context) ([]byte, error) {
func (f Data) ReadAll(ctx context.Context) ([]byte, error) {
return []byte(fmt.Sprintf("%+v\n", fetch.Hosts[f.Hostname])), nil
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment