code: func GetFSTOutput(fst *FST, input []byte) (output interface{}, err error) {
  	if fst.inputType != INPUT_TYPE_BYTE1 {
  		panic("assert fail")
  	}
  	fstReader := fst.BytesReader()
  	// TODO: would be nice not to alloc this on every lookup
  	arc := fst.FirstArc(&Arc{})
  
  	// Accumulate output as we go
  	output = fst.outputs.NoOutput()
  	for _, v := range input {
  		ret, err := fst.FindTargetArc(int(v), arc, arc, fstReader)
  		if ret == nil || err != nil {
  			return ret, err
  		}
  		output = fst.outputs.Add(output, arc.Output)
  	}
  
  	if arc.IsFinal() {
  		return fst.outputs.Add(output, arc.NextFinalOutput), nil
  	} else {
  		return nil, nil
  	}
  }
docs: // util/fst/Util.java
  /** Looks up the output for this input, or null if the
   *  input is not accepted */