func (p *UnixNamedPipe) Open() error {
	var err error
	if p.pipe != nil {
		//open pipe
		return nil
	}

	if _, err := os.Stat(p.path); os.IsNotExist(err) {
		//Create the pipe
		err = syscall.Mkfifo(p.path, 0600)
		if err != nil {
			return err
		}

	}

	p.pipe, err = os.OpenFile(p.path, os.O_RDWR, 0600)
	if err != nil {
		return err
	}

	return nil
}
// Open opens named pipe - will create it if doesn't exist
Open opens named pipe - will create it if doesn't exist
// Open opens named pipe - will create it if doesn ' t exist
func (p *UnixNamedPipe) Open() error {
	var err error
	if p.pipe != nil {
		return nil
	}
	if _, err := os.Stat(p.path); os.IsNotExist(err) {
		err = syscall.Mkfifo(p.path, 0600)
		if err != nil {
			return err
		}
	}
	p.pipe, err = os.OpenFile(p.path, os.O_RDWR, 0600)
	if err != nil {
		return err
	}
	return nil
}
func ( p * UnixNamedPipe ) Open ( ) error { var err error if p . pipe != nil { return nil } if _ , err := os . Stat ( p . path ) ; os . IsNotExist ( err ) { err = syscall . Mkfifo ( p . path , 0600 ) if err != nil { return err } } p . pipe , err = os . OpenFile ( p . path , os . O_RDWR , 0600 ) if err != nil { return err } return nil }
Open opens named pipe - will create it if doesn't exist
Open opens named pipe - will create it if doesn ' t exist
//open pipe //Create the pipe