Perfection is attained, not when there is nothing more to add, but when there is nothing more to be withdrawn.
somehow relates to https://www.youtube.com/watch?v=rFejpH_tAHM If i just try to think to apply it to this code sample func getCwd() (string, error) { cwd, err := os.Getwd() if err != nil { return "", fmt.Errorf("Failed to determmine cwd: %v", err) } // for those who uses symlinks to relocate their code, // the path must be evaluated. cwd, err = filepath.EvalSymlinks(cwd) if err != nil { return "", fmt.Errorf("Failed to determmine eval path: %v", err) } return cwd, nil } There are few things that might be considered fatty func getCwd() (string, error) { cwd, err := os.Getwd() or return ...fmt.Errorf("Failed to determmine cwd: %v", err) // for those who uses symlinks to relocate their code, // the path must be evaluated. cwd, err = filepath.EvalSymlinks(cwd) or return ...fmt.Errorf("Failed to eval cwd: %v", err) return cwd... } Any thoughts? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.