missing error arg
This commit is contained in:
parent
32b032ddb6
commit
ee2e28c11d
|
|
@ -4,7 +4,7 @@ import "fmt"
|
||||||
import "errors"
|
import "errors"
|
||||||
|
|
||||||
// Hello returns a greeting for the named person.
|
// 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 no name was given, return an error with a message.
|
||||||
if name == "" {
|
if name == "" {
|
||||||
return "", errors.New("empty name")
|
return "", errors.New("empty name")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue