File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ package fpgo
44type HandlerDef struct {
55 isClosed bool
66
7- ch * chan func ()
7+ ch chan func ()
88}
99
1010var defaultHandler * HandlerDef
@@ -17,11 +17,11 @@ func (handlerSelf *HandlerDef) GetDefault() *HandlerDef {
1717// New New Handler instance
1818func (handlerSelf * HandlerDef ) New () * HandlerDef {
1919 ch := make (chan func ())
20- return handlerSelf .NewByCh (& ch )
20+ return handlerSelf .NewByCh (ch )
2121}
2222
2323// NewByCh New Handler by its Channel
24- func (handlerSelf * HandlerDef ) NewByCh (ioCh * chan func ()) * HandlerDef {
24+ func (handlerSelf * HandlerDef ) NewByCh (ioCh chan func ()) * HandlerDef {
2525 new := HandlerDef {ch : ioCh }
2626 go new .run ()
2727
@@ -34,14 +34,14 @@ func (handlerSelf *HandlerDef) Post(fn func()) {
3434 return
3535 }
3636
37- * ( handlerSelf .ch ) <- fn
37+ handlerSelf .ch <- fn
3838}
3939
4040// Close Close the Handler
4141func (handlerSelf * HandlerDef ) Close () {
4242 handlerSelf .isClosed = true
4343
44- close (* handlerSelf .ch )
44+ close (handlerSelf .ch )
4545}
4646
4747// IsClosed Check is Closed
@@ -50,7 +50,7 @@ func (handlerSelf *HandlerDef) IsClosed() bool {
5050}
5151
5252func (handlerSelf * HandlerDef ) run () {
53- for fn := range * handlerSelf .ch {
53+ for fn := range handlerSelf .ch {
5454 fn ()
5555 }
5656}
You can’t perform that action at this time.
0 commit comments