code: func (r *REPL) OneShot(ctx context.Context, line string) error {
  
  	var err error
  	r.txn, err = r.store.NewTransaction(ctx)
  	if err != nil {
  		return err
  	}
  
  	defer r.store.Abort(ctx, r.txn)
  
  	if r.metrics != nil {
  		defer r.metrics.Clear()
  	}
  
  	if len(r.buffer) == 0 {
  		if cmd := newCommand(line); cmd != nil {
  			switch cmd.op {
  			case "dump":
  				return r.cmdDump(ctx, cmd.args)
  			case "json":
  				return r.cmdFormat("json")
  			case "show":
  				return r.cmdShow(cmd.args)
  			case "unset":
  				return r.cmdUnset(ctx, cmd.args)
  			case "pretty":
  				return r.cmdFormat("pretty")
  			case "pretty-limit":
  				return r.cmdPrettyLimit(cmd.args)
  			case "trace":
  				return r.cmdTrace()
  			case "metrics":
  				return r.cmdMetrics()
  			case "instrument":
  				return r.cmdInstrument()
  			case "profile":
  				return r.cmdProfile()
  			case "types":
  				return r.cmdTypes()
  			case "unknown":
  				return r.cmdUnknown(cmd.args)
  			case "help":
  				return r.cmdHelp(cmd.args)
  			case "exit":
  				return r.cmdExit()
  			}
  		}
  
  		r.buffer = append(r.buffer, line)
  		return r.evalBufferOne(ctx)
  	}
  
  	r.buffer = append(r.buffer, line)
  	if len(line) == 0 {
  		return r.evalBufferMulti(ctx)
  	}
  
  	return nil
  }
docs: // OneShot evaluates the line and prints the result. If an error occurs it is
  // returned for the caller to display.