forked from tinygo-org/net
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net: implement ResolveIPAddr with stub for lookupProtocol, take tinyg…
…o-org#2 This is a rework of PR#24 based on review comments. The rework mostly involved moving changes to the proper files, aligning with upstream Go src/net file layout.
- Loading branch information
1 parent
e4c3cdf
commit 4927c84
Showing
3 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// TINYGO: The following is copied and modified from Go 1.22.0 official implementation. | ||
|
||
// Copyright 2011 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
//go:build unix || js || wasip1 | ||
|
||
package net | ||
|
||
import ( | ||
"context" | ||
"errors" | ||
) | ||
|
||
// lookupProtocol looks up IP protocol name in /etc/protocols and | ||
// returns correspondent protocol number. | ||
func lookupProtocol(_ context.Context, name string) (int, error) { | ||
return 0, errors.New("net:lookupProtocol not implemented") | ||
} |