// ArrayNullEmpty adds an array or slice to be encoded, must be used inside a slice or array encoding (does not encode a key)
// value must implement Marshaler
772437
func (enc *Encoder) ArrayNullEmpty(v MarshalerJSONArray) {
	enc.grow(4)
	r := enc.getPreviousRune()
	if r != '[' {
		enc.writeByte(',')
	}
	if v.IsNil() {
		enc.writeBytes(nullBytes)
		return
	}
	enc.writeByte('[')
	v.MarshalJSONArray(enc)
	enc.writeByte(']')
}
1145175
func nullOrEmpty(path string) (bool, error) {
	fi, err := os.Stat(path)
	if err != nil {
		return false, err
	}
	m := fi.Mode()
	if m.IsRegular() && fi.Size() <= 0 {
		return true, nil
	}
	if m&os.ModeCharDevice > 0 {
		return true, nil
	}
	return false, nil
}
574631
func (a *Assertion) NotEmpty(expr interface{}, msg ...interface{}) *Assertion {
	NotEmpty(a.t, expr, msg...)
	return a
}
1260254
func (ref *ShapeRef) CanBeEmpty() bool {
	switch ref.Shape.Type {
	case "string":
		return !(ref.Location == "uri" || ref.HostLabel)
	case "blob", "map", "list":
		return !(ref.Location == "uri")
	default:
		return true
	}
}
514429
func (enc *Encoder) ArrayKeyOmitEmpty(key string, v MarshalerJSONArray) {
	if enc.hasKeys {
		if !enc.keyExists(key) {
			return
		}
	}
	if v.IsNil() {
		return
	}
	enc.grow(5 + len(key))
	r := enc.getPreviousRune()
	if r != '{' {
		enc.writeByte(',')
	}
	enc.writeByte('"')
	enc.writeStringEscape(key)
	enc.writeBytes(objKeyArr)
	v.MarshalJSONArray(enc)
	enc.writeByte(']')
}
810998
func (ia *Int64Array) MarshalJSON() ([]byte, error) {
	if ia == nil || !ia.Valid {
		return []byte("null"), nil
	}
	return json.Marshal(ia.Int64Array)
}
999651
func (e *Encoder) ArraysWithOneElementPerLine(v bool) *Encoder {
	e.arraysOneElementPerLine = v
	return e
}
314902
func authIsEmpty(auth *docker.AuthConfiguration) bool {
	if auth == nil {
		return false
	}
	return auth.Username == "" &&
		auth.Password == "" &&
		auth.Email == "" &&
		auth.ServerAddress == ""
}
1354787
func (r *RegionSet) HasNonEmpty() bool {
	r.lock.Lock()
	defer r.lock.Unlock()
	for _, r := range r.regions {
		if !r.Empty() {
			return true
		}
	}
	return false
}
200009
func (enc *Encoder) SQLNullStringKeyNullEmpty(key string, v *sql.NullString) {
	if v != nil && v.Valid {
		enc.StringKeyNullEmpty(key, v.String)
	}
}
1164770
func (a Annotation) CheckKeysNonEmpty(keys ...string) error {
	for _, k := range keys {
		v, ok := a.getVal(k)
		if !ok {
			return errors.NotFoundf("annotation key %q", k)
		}
		if v == "" {
			return errors.NotValidf("annotation key %q has empty value", k)
		}
	}
	return nil
}
122669
func NotEmpty(profiler LXDProfiler) bool {
	if profile := profiler.LXDProfile(); profile != nil {
		return !profile.Empty()
	}
	return false
}
557616
func parseArray(array string) []string {
	results := []string{}
	matches := arrayExp.FindAllStringSubmatch(array, -1)
	for _, match := range matches {
		s := match[valueIndex]
		// the string _might_ be wrapped in quotes, so trim them:
		s = strings.Trim(s, "\"")
		results = append(results, s)
	}
	return results
}
654520
func (id DocumentID) ValidateOrEmpty() error {
	if id == "" {
		return nil
	}
	if err := id.Validate(); err != nil {
		return WithStack(err)
	}
	return nil
}
637553
func (enc *Encoder) SQLNullBoolKeyOmitEmpty(key string, v *sql.NullBool) {
	if v != nil && v.Valid && v.Bool != false {
		enc.BoolKeyOmitEmpty(key, v.Bool)
	}
}
4913
func (m *Match) NotEmpty() *Match {
	if len(m.submatches) == 0 {
		m.chain.fail("expected non-zero submatches")
	}
	return m
}
585316
func (enc *Encoder) SQLNullInt64KeyNullEmpty(key string, v *sql.NullInt64) {
	if v != nil && v.Valid {
		enc.Int64KeyNullEmpty(key, v.Int64)
	}
}