func (a *Argument) SetTypeInfo() error {
	interfaceType := reflect.TypeOf((*interface{})(nil)).Elem()
	if a.Type == interfaceType {
		a.Value = reflect.Indirect(reflect.New(a.Type))
	}
	if a.Type.Kind() == reflect.Ptr {
		a.Pointer = true
		a.Optional = true
	}
	return nil
}
ArgumentFromType constructs an Argument by examining the given reflect.Type.
package marker
import (
	"errors"
	"fmt"
	"reflect"
	"strings"
	"github.com/vmware-tanzu-labs/operator-builder/internal/markers/parser"
)
var (
	ErrWrongType = errors.New("incorrect type")
	ErrUnmarshal = errors.New("unable to unmarshal arg value")
)
type Argument struct {
	Name      string
	FieldName string
	Type reflect.Type
	Optional bool
	Pointer bool
	Value reflect.Value
	isSet bool
}
func (a Argument) String() string {
	if a.Optional {
		return fmt.Sprintf("<optional arg %s>", a.Type)
	}
	return fmt.Sprintf("<arg %s>", a.Type)
}
func ArgumentFromField(field *reflect.StructField) (Argument, error) {
	arg := Argument{
		Name:      lowerCamelCase(field.Name),
		FieldName: field.Name,
		Type:      field.Type,
		Optional:  false,
	}
	if tag, found := field.Tag.Lookup("marker"); found {
		parts := strings.Split(tag, ",")
		if parts[0] != "" {
			arg.Name = parts[0]
		}
		for _, opt := range parts[1:] {
			if opt == "optional" {
				arg.Optional = true
			}
		}
	}
	if err := arg.SetTypeInfo(); err != nil {
		return arg, err
	}
	return arg, nil
}