fuseversion

package
v0.3.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2015 License: MIT Imports: 2 Imported by: 0

README

go-fuse-version

Simple package to get the user's FUSE libraries information.

Warning Currently only supports OSXFUSE. if you want more, add them, it's really trivial now.

Example

package main

import (
  "fmt"
  "os"

  fuseversion "github.com/jbenet/go-fuse-version"
)

func main() {
  sys, err := fuseversion.LocalFuseSystems()
  if err != nil {
    fmt.Fprintf(os.Stderr, "%s\n", err)
    os.Exit(1)
  }

  fmt.Printf("FuseVersion, AgentVersion, Agent\n")
  for _, s := range *sys {
    fmt.Printf("%s, %s, %s\n", s.FuseVersion, s.AgentVersion, s.AgentName)
  }
}

fuse-print

If you dont use Go, you can also install the example as the silly util fuse-version:

> go get github.com/jbenet/go-fuse-version/fuse-version
> go install github.com/jbenet/go-fuse-version/fuse-version
> fuse-version
FuseVersion, AgentVersion, Agent
27, 2.7.2, OSXFUSE

Documentation

Overview

package fuseversion simply exposes the version of FUSE installed in the user's machine. For reasoning, see: - https://github.com/jbenet/go-ipfs/issues/177 - https://github.com/jbenet/go-ipfs/issues/202 - https://github.com/osxfuse/osxfuse/issues/175#issuecomment-61888505

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FuseSystem

type FuseSystem struct {
	// FuseVersion is the version of the FUSE protocol
	FuseVersion string

	// AgentName identifies the system implementing FUSE, or Agent
	AgentName string

	// AgentVersion is the version of the Agent program
	// (it fights for the user! Sometimes it fights the user...)
	AgentVersion string
}

type Systems

type Systems map[string]FuseSystem

func LocalFuseSystems

func LocalFuseSystems() (Systems, error)

LocalFuseSystems returns a map of FuseSystems, keyed by name. For example:

systems := fuseversion.LocalFuseSystems()
for n, sys := range systems {
  fmt.Printf("%s, %s, %s", n, sys.FuseVersion, sys.AgentVersion)
}
// Outputs:
// OSXFUSE, , 2.7.2

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL