code: func unlockpt(f *os.File) error {
  	if _, err := C.grantpt(C.int(f.Fd())); err != nil {
  		return err
  	}
  	return nil
  }
docs: // unlockpt unlocks the slave pseudoterminal device corresponding to the master pseudoterminal referred to by f.
  // unlockpt should be called before opening the slave side of a pty.