Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ environment. However it works well in most office, home, or private infrastructu
environments.

Using the library is very simple, here is an example of publishing a service entry:

```go
// Setup our service export
host, _ := os.Hostname()
info := []string{"My awesome service"}
Expand All @@ -19,10 +19,10 @@ Using the library is very simple, here is an example of publishing a service ent
// Create the mDNS server, defer shutdown
server, _ := mdns.NewServer(&mdns.Config{Zone: service})
defer server.Shutdown()

```

Doing a lookup for service providers is also very simple:

```go
// Make a channel for results and start listening
entriesCh := make(chan *mdns.ServiceEntry, 4)
go func() {
Expand All @@ -34,4 +34,4 @@ Doing a lookup for service providers is also very simple:
// Start the lookup
mdns.Lookup("_foobar._tcp", entriesCh)
close(entriesCh)

```