// Namespace returns the path to the name space directory.

Namespace returns the path to the name space directory.
// Namespace returns the path to the name space directory .
func Namespace() string {
	ns := os.Getenv("NAMESPACE")
	if ns != "" {
		return ns
	}
	disp := os.Getenv("DISPLAY")
	if disp == "" {
		disp = ":0.0"
	}
	if m := dotZero.FindStringSubmatch(disp); m != nil {
		disp = m[1]
	}
	disp = strings.Replace(disp, "/", "_", -1)
	return fmt.Sprintf("/tmp/ns.%s.%s", os.Getenv("USER"), disp)
}
func Namespace ( ) string { ns := os . Getenv ( " " ) if ns != " " { return ns } disp := os . Getenv ( " " ) if disp == " " { disp = " " } if m := dotZero . FindStringSubmatch ( disp ) ; m != nil { disp = m [ 1 ] } disp = strings . Replace ( disp , " " , " " , - 1 ) return fmt . Sprintf ( " " , os . Getenv ( " " ) , disp ) }
Namespace returns the path to the name space directory.
Namespace returns the path to the name space directory .
// No $DISPLAY? Use :0.0 for non-X11 GUI (OS X).
 // Canonicalize: xxx:0.0 => xxx:0.
 // Turn /tmp/launch/:0 into _tmp_launch_:0 (OS X 10.5).
 // NOTE: plan9port creates this directory on demand.
 // Maybe someday we'll need to do that.
