func (gpio *GPIO) Close() error {
	gpio.DisableEdgeDetection()
	if gpio.valueFile != nil {
		gpio.valueFile.Close()
	}
	if !IsExported(gpio.nr) {
		return nil
	}
	return dry.FilePrintf("/sys/class/gpio/unexport", "%d", gpio.nr)
}
Close unexports the GPIO pin.
package gpio
import (
	"fmt"
	"os"
	"runtime"
	"syscall"
	"time"
	"github.com/ungerik/go-dry"
)
type Value int
const (
	LOW  Value = 0
	HIGH Value = 1
	_EPOLLET = 1 << 31
)
type Edge string
const (
	EDGE_NONE    Edge = "none"
	EDGE_RISING  Edge = "rising"
	EDGE_FALLING Edge = "falling"
	EDGE_BOTH    Edge = "both"
)
type EdgeEvent struct {
	Time  time.Time
	Value Value
}
type Direction string
const (
	DIRECTION_IN  Direction = "in"
	DIRECTION_OUT Direction = "out"
)
type PullUpDown int
const (
	PUD_OFF  PullUpDown = 0
	PUD_DOWN PullUpDown = 1
	PUD_UP   PullUpDown = 2
)
func IsExported(nr int) bool {
	return dry.FileExists(fmt.Sprintf("/sys/class/gpio/gpio%d/", nr))
}
type GPIO struct {
	nr        int
	valueFile *os.File
	epollFd   dry.SyncInt
	edge      Edge
}
func NewGPIO(nr int, direction Direction) (gpio *GPIO, err error) {
	if !IsExported(nr) {
		err = dry.FilePrintf("/sys/class/gpio/export", "%d", nr)
		if err != nil {
			return nil, err
		}
	}
	gpio = &GPIO{nr: nr}
	err = gpio.SetDirection(direction)
	if err != nil {
		return nil, err
	}
	return gpio, nil
}