code: func newDumpState(value interface{}, options *Options, writer io.Writer) *dumpState {
  	result := &dumpState{
  		config:   options,
  		pointers: MapReusedPointers(reflect.ValueOf(value)),
  		w:        writer,
  	}
  
  	if options.HomePackage != "" {
  		result.homePackageRegexp = regexp.MustCompile(fmt.Sprintf("\\b%s\\.", options.HomePackage))
  	}
  
  	return result
  }
docs: // prepares a new state object for dumping the provided value