func (r commonResult) Extract() (*VirtualInterface, error) {
	if r.Err != nil {
		return nil, r.Err
	}
	var res struct {
		VirtualInterfaces []VirtualInterface `mapstructure:"virtual_interfaces" json:"virtual_interfaces"`
	}
	err := mapstructure.Decode(r.Body, &res)
	return &res.VirtualInterfaces[0], err
}
Extract is a function that accepts a result and extracts a network resource.
package virtualinterfaces
import (
	"github.com/mitchellh/mapstructure"
	"github.com/rackspace/gophercloud"
	"github.com/rackspace/gophercloud/pagination"
)
type commonResult struct {
	gophercloud.Result
}