Skip to content

Commit 1336d24

Browse files
committed
doc improvements
1 parent 0a61179 commit 1336d24

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

host/entry.go

+10-2
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,12 @@ var theEntry Entry
284284
//
285285
// Connect can be called many times without cost of re-initialising a
286286
// connection. Connect can be called in different goroutines.
287+
//
288+
// The argument pkgSel is used to filter the implementions of
289+
// an entry point by means of examining their defining package path
290+
// by reflection. It should return true if it accepts the
291+
// implementation. If pkgSel is nil, Connect acts as though
292+
// the function body were "return true".
287293
func Connect(pkgSel func(string) bool) (Entry, error) {
288294
nms := Names()
289295
if len(nms) == 0 {
@@ -299,8 +305,10 @@ func Connect(pkgSel func(string) bool) (Entry, error) {
299305
// ConnectTo returns ErrEntryInUse if another host entry other than one
300306
// requested is in use.
301307
//
302-
// Connect can be called many times without cost of re-initialising a
303-
// connection. Connect can be called in different goroutines.
308+
// ConnectTo can be called many times without cost of re-initialising a
309+
// connection. ConnectTo can be called in different goroutines.
310+
//
311+
// pkgSel is as in Connect.
304312
func ConnectTo(name string, pkgSel func(string) bool) (Entry, error) {
305313
hMu.Lock()
306314
defer hMu.Unlock()

0 commit comments

Comments
 (0)