cmd/panic/internal/internal.go
raw| 1 | // Copyright 2017 Marc-Antoine Ruel. All rights reserved. |
| 2 | // Use of this source code is governed under the Apache License, Version 2.0 |
| 3 | // that can be found in the LICENSE file. |
| 4 | |
| 5 | // Package internal is for use for panic. |
| 6 | package internal |
| 7 | |
| 8 | // Callback calls back a function through an external then internal function. |
| 9 | func Callback(f func()) { |
| 10 | callback(f) |
| 11 | } |
| 12 | |
| 13 | func callback(f func()) { |
| 14 | f() |
| 15 | } |