notifyb

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2023 License: MIT Imports: 0 Imported by: 3

README

go-notifyb

GoDev

go-notifyb パッケージは通知を表す error を提供します.

Usage

const MyEOF notifyb.Notify = "my eof"

func Foo() error {
	return MyEOF
}

License

This software is released under the MIT License, see LICENSE.

Author

17e10

Documentation

Overview

notifyb パッケージは通知を表す error を提供します.

エラーは通常 ErrXXX のような名称で定義しますが、 io.EOF などのように通知を表す error を定義したい場合があります.

次のように記述すると MyEOF は error として振る舞うことができます.

const MyEOF notify.Notify = "my eof"

func Foo() error {
	return MyEOF
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notify

type Notify string

Notify は通知を error で返すための型です.

func (Notify) Error

func (e Notify) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL