Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(741)

Side by Side Diff: src/net/port_unix.go

Issue 152570049: [dev.power64] code review 152570049: all: merge default into dev.power64 (Closed)
Patch Set: diff -r 36f7fc9495481ed67a159eea0eb2fac35b7c46a5 https://code.google.com/p/go Created 10 years, 4 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/net/port_test.go ('k') | src/net/rpc/client.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 The Go Authors. All rights reserved. 1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 // +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris 5 // +build darwin dragonfly freebsd linux netbsd openbsd solaris
6 6
7 // Read system port mappings from /etc/services 7 // Read system port mappings from /etc/services
8 8
9 package net 9 package net
10 10
11 import "sync" 11 import "sync"
12 12
13 // services contains minimal mappings between services names and port 13 // services contains minimal mappings between services names and port
14 // numbers for platforms that don't have a complete list of port numbers 14 // numbers for platforms that don't have a complete list of port numbers
15 // (some Solaris distros). 15 // (some Solaris distros).
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 network = "udp" 64 network = "udp"
65 } 65 }
66 66
67 if m, ok := services[network]; ok { 67 if m, ok := services[network]; ok {
68 if port, ok = m[service]; ok { 68 if port, ok = m[service]; ok {
69 return 69 return
70 } 70 }
71 } 71 }
72 return 0, &AddrError{"unknown port", network + "/" + service} 72 return 0, &AddrError{"unknown port", network + "/" + service}
73 } 73 }
OLDNEW
« no previous file with comments | « src/net/port_test.go ('k') | src/net/rpc/client.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b