-
-
Notifications
You must be signed in to change notification settings - Fork 397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working verify #29
Labels
bug
Something isn't working
Comments
|
코드에 io reader closer을 바이트로 변환해서 찍어보니..
결국 값이 제대로 들어오지 않아 발생한 문제 |
bytes, _ := ioutil.ReadAll(resp.Body)
str := string(bytes)
vds := VerifyDOM(resp.Body) 느낌적인 느낌이 resp.Body 즉 웹 요청 이후의 ioReader가 강제로 closing되서 데이터가 없는 것 같음. |
https://golang.org/pkg/strings/#NewReader 참고 r := ioutil.NopCloser(strings.NewReader("hello world")) // r type is io.ReadCloser
// example to test r
buf := new(bytes.Buffer)
buf.ReadFrom(r)
r.Close()
s := buf.String()
fmt.Println(s) |
VerifyDOM의 인자를 string으로 바꾸고, 내부에서 ReadCloser로 바꿈.
잘됨
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: