GOLANGPROFI Telegram 364
Что выведет код?

package main

import (
"errors"
"fmt"
)

var ErrNotFound = errors.New("Resource was not found")

func main() {
err := raise()
if err == ErrNotFound {
fmt.Println("impossible")
return
}
if err != nil {
fmt.Println("unexpected error")
return
}
}

func raise() error {
return ErrNotFound
}

Ответ



tgoop.com/golangprofi/364
Create:
Last Update:

Что выведет код?

package main

import (
"errors"
"fmt"
)

var ErrNotFound = errors.New("Resource was not found")

func main() {
err := raise()
if err == ErrNotFound {
fmt.Println("impossible")
return
}
if err != nil {
fmt.Println("unexpected error")
return
}
}

func raise() error {
return ErrNotFound
}

Ответ

BY Golang Юниор


Share with your friend now:
tgoop.com/golangprofi/364

View MORE
Open in Telegram


Telegram News

Date: |

Ng was convicted in April for conspiracy to incite a riot, public nuisance, arson, criminal damage, manufacturing of explosives, administering poison and wounding with intent to do grievous bodily harm between October 2019 and June 2020. The Channel name and bio must be no more than 255 characters long Telegram Channels requirements & features 4How to customize a Telegram channel? How to create a business channel on Telegram? (Tutorial)
from us


Telegram Golang Юниор
FROM American