Skip to content

Commit 1d5b441

Browse files
committed
Revert "Make public the function to parse AS with separators."
This reverts commit 367d322.
1 parent 22c5c91 commit 1d5b441

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pkg/addr/fmt.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func ParseFormattedAS(as string, opts ...FormatOption) (AS, error) {
6565
}
6666
as = trimmed
6767
}
68-
return ParseASSep(as, o.separator)
68+
return parseAS(as, o.separator)
6969
}
7070

7171
// FormatIA formats the ISD-AS.

pkg/addr/isdas.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ type AS uint64
7777
// ParseAS parses an AS from a decimal (in the case of the 32bit BGP AS number
7878
// space) or ipv6-style hex (in the case of SCION-only AS numbers) string.
7979
func ParseAS(as string) (AS, error) {
80-
return ParseASSep(as, ":")
80+
return parseAS(as, ":")
8181
}
8282

8383
// MustParseAS parses s and returns the corresponding addr.AS object. It panics
@@ -90,7 +90,7 @@ func MustParseAS(s string) AS {
9090
return as
9191
}
9292

93-
func ParseASSep(as string, sep string) (AS, error) {
93+
func parseAS(as string, sep string) (AS, error) {
9494
parts := strings.Split(as, sep)
9595
if len(parts) == 1 {
9696
// Must be a BGP AS, parse as 32-bit decimal number

0 commit comments

Comments
 (0)