This commit is contained in:
Chris Cowley 2024-09-26 15:53:25 +02:00
parent c709eaf71a
commit a5ec44b1f1

View file

@ -6,7 +6,7 @@ import (
)
// Hello returns a greeting for the named person.
func Hello(name string) string {
func Hello(name string) (string, error) {
// If no name was given, return an error with a message.
if name == "" {
return "", errors.New("empty name")