Skip to content

Commit 1d17d4d

Browse files
authored
chore: fix some comments (#247)
Signed-off-by: cui fliter <[email protected]>
1 parent 6704628 commit 1d17d4d

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

connection_onevent.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ func (c *connection) AddCloseCallback(callback CloseCallback) error {
9090
return nil
9191
}
9292

93-
// OnPrepare supports close connection, but not read/write data.
93+
// onPrepare supports close connection, but not read/write data.
9494
// connection will be registered by this call after preparing.
9595
func (c *connection) onPrepare(opts *options) (err error) {
9696
if opts != nil {

netpoll_options.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,15 @@ import (
2929
// Experience recommends assigning a poller every 20c.
3030
//
3131
// You can only use SetNumLoops before any connection is created. An example usage:
32-
// func init() {
33-
// netpoll.SetNumLoops(...)
34-
// }
32+
//
33+
// func init() {
34+
// netpoll.SetNumLoops(...)
35+
// }
3536
func SetNumLoops(numLoops int) error {
3637
return setNumLoops(numLoops)
3738
}
3839

39-
// LoadBalance sets the load balancing method. Load balancing is always a best effort to attempt
40+
// SetLoadBalance sets the load balancing method. Load balancing is always a best effort to attempt
4041
// to distribute the incoming connections between multiple polls.
4142
// This option only works when NumLoops is set.
4243
func SetLoadBalance(lb LoadBalance) error {

0 commit comments

Comments
 (0)