// ptype extracts the MQTT Control Packet type from
// the fixed header and returns it.
497270
func (fixedHeader FixedHeader) ptype() (byte, error) {
	// Check the length of the fixed header.
	if len(fixedHeader) < 1 {
		return 0x00, ErrInvalidFixedHeaderLen
	}

	// Extract the MQTT Control Packet type from
	// the fixed header and return it.
	return fixedHeader[0] >> 4, nil
}
669723
func (u *UserLDAPMapping) GetType() string {
	if u == nil || u.Type == nil {
		return ""
	}
	return *u.Type
}
135060
func (c *Client) Type(ctx context.Context) (string, error) {
	_, tsdbType, err := c.pingTimeout(ctx)
	return tsdbType, err
}
938776
func (p provider) ReturnType() reflect.Type {
	return reflect.TypeOf(p.constructor).Out(0)
}
99284
func toType(p interface{}) reflect.Type {
	t := reflect.ValueOf(p).Type()
	if t.Kind() == reflect.Ptr {
		t = t.Elem()
	}
	return t
}
126158
func (c *Certificate) Type() string {
	algo, ok := certAlgoNames[c.Key.Type()]
	if !ok {
		panic("unknown cert key type")
	}
	return algo
}
739194
func (h *Header) ContentType() (t string, params map[string]string, err error) {
	v := h.Get("Content-Type")
	if v == "" {
		return "text/plain", nil, nil
	}
	return parseHeaderWithParams(v)
}
358900
func AscType(p1Ptr, p2Ptr *SockAddr) int {
	p1 := *p1Ptr
	p2 := *p2Ptr
	p1Type := p1.Type()
	p2Type := p2.Type()
	switch {
	case p1Type < p2Type:
		return sortReceiverBeforeArg
	case p1Type == p2Type:
		return sortDeferDecision
	case p1Type > p2Type:
		return sortArgBeforeReceiver
	default:
		return sortDeferDecision
	}
}
989135
func underlyingPtrType(val interface{}) (interface{}, bool) {
	refVal := reflect.ValueOf(val)

	switch refVal.Kind() {
	case reflect.Ptr:
		if refVal.IsNil() {
			return nil, false
		}
		convVal := refVal.Elem().Interface()
		return convVal, true
	}

	return nil, false
}
616101
func (f *FilterOp) Type(fieldType string) *FilterOp {
	f.TypeProp = &TypeFilter{Value: fieldType}
	return f
}
869597
func (s *Script) Type(typ string) *Script {
	s.typ = typ
	return s
}
553440
func IsType(t TestingT, expectedType interface{}, object interface{}, msgAndArgs ...interface{}) {
	if h, ok := t.(tHelper); ok {
		h.Helper()
	}
	if assert.IsType(t, expectedType, object, msgAndArgs...) {
		return
	}
	t.FailNow()
}
847201
func Type(kind string) *Mux {
	return Match(func(ctx *c.Context) bool {
		if ctx.GetString("$phase") != "response" {
			return false
		}
		if value, ok := types.Types[kind]; ok {
			kind = value
		}
		return strings.Contains(ctx.Response.Header.Get("Content-Type"), kind)
	})
}
72440
func (s *PutTemplateService) OpType(opType string) *PutTemplateService {
	s.opType = opType
	return s
}
532476
func IsType(buf []byte, kind types.Type) bool {
	matcher := matchers.Matchers[kind]
	if matcher == nil {
		return false
	}
	return matcher(buf) != types.Unknown
}
362384
func (q *QueryStringQuery) Type(typ string) *QueryStringQuery {
	q.typ = typ
	return q
}
254687
func (r Network_Storage_Iscsi) GetOsType() (resp datatypes.Network_Storage_Iscsi_OS_Type, err error) {
	err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getOsType", nil, &r.Options, &resp)
	return
}