func parseProfile(filepath string) map[string]string { file, err := os.Open(filepath) failIf(err) defer file.Close() processes, err := procker.ParseProcfile(file) failIf(err) return processes }
func parseProfile(filepath string) (map[string]string, error) { file, err := os.Open(filepath) if err != nil { return nil, err } defer file.Close() processes, err := procker.ParseProcfile(file) if err != nil { return nil, err } return processes, nil }