func Plural() bool {
	mu.RLock()
	defer mu.RUnlock()
	return asPlural
}
Plural returns true if resource.SetPlural was called,
otherwise returns false.
package resource
import (
	"database/sql/driver"
	"fmt"
	"strconv"
	"strings"
	"sync"
	"github.com/golang/protobuf/proto"
	resourcepb "github.com/infobloxopen/atlas-app-toolkit/rpc/resource"
	"github.com/infobloxopen/atlas-app-toolkit/util"
)
const defaultResource = "<default>"
var (
	mu       sync.RWMutex
	registry = make(map[string]Codec)
	appname  string
	asEmpty  bool
	asPlural bool
)
type Codec interface {
	Encode(driver.Value) (*resourcepb.Identifier, error)
	Decode(*resourcepb.Identifier) (driver.Value, error)
}
type Namer interface {
	ResourceName() string
}
func RegisterApplication(name string) {
	mu.Lock()
	defer mu.Unlock()
	if appname != "" {
		panic("resource: application name already registered")
	}
	appname = name
}
func SetReturnEmpty() {
	mu.Lock()
	defer mu.Unlock()
	asEmpty = true
}
func ReturnEmpty() bool {
	mu.RLock()
	defer mu.RUnlock()
	return asEmpty
}
func SetPlural() {
	mu.Lock()
	defer mu.Unlock()
	asPlural = true
}