Skip to content

Commit

Permalink
add cgo code for striped golang https client
Browse files Browse the repository at this point in the history
see #426 for more detail.

Signed-off-by: cfc4n <cfc4n.cs@gmail.com>
  • Loading branch information
cfc4n committed Dec 1, 2023
1 parent b56b88d commit c7bdd3e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/golang_https.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
package main

/*
#include <stdio.h>
#include <stdlib.h>
void test() {
printf("hello CGO!\n");
}
*/
import "C"
import (
"crypto/tls"
"fmt"
Expand All @@ -10,7 +19,7 @@ import (
)

func main() {

C.test()
b, e := GetHttp("https://baidu.com")
if e == nil {
fmt.Printf("response body: %s\n\n", b)
Expand Down

0 comments on commit c7bdd3e

Please sign in to comment.