Skip to content

Commit

Permalink
update the comments
Browse files Browse the repository at this point in the history
  • Loading branch information
xgfone committed May 13, 2024
1 parent b9f33ef commit ce714ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions defaults_onexit.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ var (
func Exit(code int) { ExitFunc.Get()(code) }

// OnExit is the proxy of OnExitFunc to register the exit function f.
//
// NOTICE: OnExitFunc must be set before calling this function.
func OnExit(f func()) { OnExitFunc.Get()(f) }

func onexit(f func()) {
Expand Down
2 changes: 2 additions & 0 deletions defaults_oninit.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ var (
)

// OnInit is the proxy of OnInitFunc to register the init function f.
//
// NOTICE: OnInitFunc must be set before calling this function.
func OnInit(f func()) { OnInitFunc.Get()(f) }

func oninit(f func()) {
Expand Down

0 comments on commit ce714ed

Please sign in to comment.