~fmac/corylus

ref: e83d345cf7540c90f3bee891ea2e4171d9abfbee corylus/user.go -rw-r--r-- 174 bytes
e83d345cFrancesco Camuffo Show two chars in CWD if first is '.' 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
package main

import (
	"os/user"
)

func segUsername() (string, error) {
	if u, err := user.Current(); err != nil {
		return "", err
	} else {
		return u.Username, nil
	}
}