code: func ExpandTilde(pth string) (string, error) {
  	if pth == "" {
  		return "", errors.New("No Path provided")
  	}
  
  	if strings.HasPrefix(pth, "~") {
  		pth = strings.TrimPrefix(pth, "~")
  
  		if len(pth) == 0 || strings.HasPrefix(pth, "/") {
  			return os.ExpandEnv("$HOME" + pth), nil
  		}
  
  		splitPth := strings.Split(pth, "/")
  		username := splitPth[0]
  
  		usr, err := user.Lookup(username)
  		if err != nil {
  			return "", err
  		}
  
  		pathInUsrHome := strings.Join(splitPth[1:], "/")
  
  		return filepath.Join(usr.HomeDir, pathInUsrHome), nil
  	}
  
  	return pth, nil
  }
docs: // ExpandTilde ...