-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(gno): add seen stack to keep track of already processed struct
- Loading branch information
1 parent
f7d7125
commit 423a87d
Showing
4 changed files
with
67 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"errors" | ||
"io" | ||
"time" | ||
) | ||
|
||
type Header map[string][]string | ||
|
||
type Values map[string][]string | ||
|
||
type Request struct { | ||
Method string | ||
Proto string // "HTTP/1.0" | ||
ProtoMajor int // 1 | ||
ProtoMinor int // 0 | ||
Header Header | ||
ContentLength int64 | ||
TransferEncoding []string | ||
Close bool | ||
Host string | ||
} | ||
|
||
type Response struct { | ||
Status string // e.g. "200 OK" | ||
StatusCode int // e.g. 200 | ||
Proto string // e.g. "HTTP/1.0" | ||
ProtoMajor int // e.g. 1 | ||
ProtoMinor int // e.g. 0 | ||
} | ||
|
||
type extendedRequest struct { | ||
Request2 Request | ||
|
||
Data string | ||
} | ||
|
||
func main() { | ||
r := extendedRequest{} | ||
req := &r.Request2 | ||
|
||
fmt.Println(r) | ||
fmt.Println(req) | ||
} | ||
|
||
// Output: | ||
// {{ 0 0 map[] <nil> 0 [] false map[] map[] map[] <nil>} } | ||
// &{ 0 0 map[] <nil> 0 [] false map[] map[] map[] <nil>} |
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 |
---|---|---|
|
@@ -734,7 +734,6 @@ type StructType struct { | |
PkgPath string | ||
Fields []FieldType | ||
|
||
seen bool | ||
typeid TypeID | ||
} | ||
|
||
|