code: func NewPty() (Console, string, error) {
  	f, err := os.OpenFile("/dev/ptmx", unix.O_RDWR|unix.O_NOCTTY|unix.O_CLOEXEC, 0)
  	if err != nil {
  		return nil, "", err
  	}
  	slave, err := ptsname(f)
  	if err != nil {
  		return nil, "", err
  	}
  	if err := unlockpt(f); err != nil {
  		return nil, "", err
  	}
  	m, err := newMaster(f)
  	if err != nil {
  		return nil, "", err
  	}
  	return m, slave, nil
  }
docs: // NewPty creates a new pty pair
  // The master is returned as the first console and a string
  // with the path to the pty slave is returned as the second