code: func (d *Domain) handleType(newType *Type, typeProperties []*ProtoProperty) {
  	// loop over properties of this new type
  	for _, protoProp := range typeProperties {
  		// It's a reference, see if it points to a base type or not
  		newProp := NewTypeProperties(protoProp)
  		// base type, add it and fix up description
  		if isBaseType(protoProp) {
  			goType := getGoType(newProp)
  			d.createBase(newProp, goType)
  			newType.Properties = append(newType.Properties, newProp)
  			continue
  		}
  
  		if ok := d.resolveReference(newProp); ok {
  			newType.Properties = append(newType.Properties, newProp)
  			continue
  		}
  
  		// is this a subType?
  		if isSubType(protoProp) {
  			fmt.Printf("issubtype true for: %s\n", protoProp.Name)
  			d.createSubType(newType, protoProp)
  		}
  	}
  }
docs: // Takes in a new type, checks if it is a base type, or an object or an array.