• Stars
    star
    477
  • Rank 92,112 (Top 2 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created about 13 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

golang curl(libcurl) binding.

go-curl

Build Status

my golang libcurl(curl) binding.

See more examples in ./examples/ directory~!

LICENSE

go-curl is licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html).

Current Development Status

  • currently stable
  • READ, WRITE, HEADER, PROGRESS function callback
  • a Multipart Form supports file uploading
  • Most curl_easy_setopt option
  • partly implement share & multi interface
  • new callback function prototype

How to Install

Make Sure You Have libcurl (and its develop headers, static/dynamic libs) installed!

$ go get -u github.com/andelf/go-curl

Current Status

  • Linux x64
    • passed go1 (ArchLinux)
  • Windows x86
    • passed go1 (win7, mingw-gcc 4.5.2, curl 7.22.0)
  • Mac OS
    • passed go1 (Mac OS X 10.7.3, curl 7.21.4)

Sample Program

package main

import (
    "fmt"
    curl "github.com/andelf/go-curl"
)

func main() {
    easy := curl.EasyInit()
    defer easy.Cleanup()

    easy.Setopt(curl.OPT_URL, "http://www.baidu.com/")

    // make a callback function
    fooTest := func (buf []byte, userdata interface{}) bool {
        println("DEBUG: size=>", len(buf))
        println("DEBUG: content=>", string(buf))
        return true
    }

    easy.Setopt(curl.OPT_WRITEFUNCTION, fooTest)

    if err := easy.Perform(); err != nil {
        fmt.Printf("ERROR: %v\n", err)
    }
}

More Repositories

1

fuck12306

12306 图片验证码识别测试
Python
2,396
star
2

PyAIML

PyAIML is an interpreter for AIML (Artificial Intelligence Markup Language). cloned from sf.net.
Python
351
star
3

Defines-Swift

Swift standard library defines. dump from Xcode
Swift
238
star
4

tronpy

TRON Python Client Library.
Python
202
star
5

rust-algs4

Algorithms, 4th Edition. Coursera MOOC. in Rust.
Rust
90
star
6

weather-rs

Weather app for the terminal. Rust version :)
Rust
86
star
7

pyqqweibo

腾讯微博 API 的python绑定
Python
76
star
8

pybaidudisk

百度网盘 命令行 Python 版
Python
51
star
9

rust-darts

Double Array Trie in Rust
Rust
51
star
10

rust-postgis

postgis helper library.
Rust
51
star
11

rust-adivon

阿迪王(一切皆可改变)! Rust实现的常见数据结构,然而也许有Bug。
Rust
48
star
12

rust-tron

Rust implementation of the Tron Network Whitepaper.
Rust
45
star
13

xyq-ios-helper

梦幻西游手游iOS端辅助工具。
Python
38
star
14

webhi

a baidu-hi robot. (baidu web-hi 聊天机器人~~) 传说中的"小丫" # 开发已经迁移到公司内部. 请直接联系作者~
Python
35
star
15

erlang-proxy

socks4, socks4a, socks5 proxy, encrypted, derived from yueyoum/make-proxy. Across the Great Wall we can reach every corner in the world.
Erlang
33
star
16

rust-2048

2048 game in Rust, with an SDL2 ui.
Rust
33
star
17

rust-sdl2_ttf

Rust bindings for sdl2_ttf.
Rust
26
star
18

beijing-realtime-bus

Beijing 实时公交。
Python
24
star
19

tinygif

A no_std GIF library for embedded applications(embedded-graphics)
Rust
23
star
20

rust-apue

Advanced Programming in the UNIX Environment. Code in Rust
Rust
18
star
21

pico-rust-playground

RPi Pico SDK and code demos in Rust.
Rust
17
star
22

rust-sdl2_gfx

Rust bindings for sdl2_gfx (SDL2 Graphic Primitives)
Rust
16
star
23

ruc-beamer-template

Latex beamer template for RUC
TeX
16
star
24

baiduhi

baiduhi client, erlang version
Erlang
15
star
25

rust-sdl2_mixer

Rust bindings for sdl2_mixer
Rust
13
star
26

logseq-ng

Logseq-NG is the experimental version of Logseq, which is built with Tauri.
Rust
13
star
27

diffmatchpatch

diff-match-patch in Rust
Rust
13
star
28

rust-erlang-driver

make erlang port driver (erl_driver) with rust!
Rust
12
star
29

nightly-release

A Github Action to create and update a Nightly Release
TypeScript
12
star
30

longan-nano-playground-rs

Longan Nano board(GD32VF103) examples, in Rust, under macOS. Bad Apple included.
Rust
12
star
31

hpm-data

Clean machine-readable data about the HPMicro RISC-V families. Embedded Rust device crates for HPM microcontrollers
Rust
12
star
32

rust-iconv

libiconv bindings for Rust.
Rust
11
star
33

fuck-ume-trip

Fuck UmeTrip. 航旅纵横API逆向
Python
11
star
34

curl-swift

Calling libcurl in Swift (Apple). Later will be libcurl binding to Swift
Swift
10
star
35

tangnano9k-playground

Tang Nano 9K Spinal projects. Learning FPGA programing.😀
Scala
9
star
36

bl702-pac

Embedded Rust's Peripheral Access Crate for BL702 RISC-V BLE microcontroller
Rust
9
star
37

memory-lcd-spi

embedded-hal driver for JDI's Memory In Pixel display or Sharp's Memory LCD: LPM013M126A, LPM009M360A
Rust
9
star
38

rp-embassy-playground

Embassy projects for RP2040
Rust
8
star
39

me200w

200w logo designer in Rust.
Rust
8
star
40

rmrb

人民日报小脚本儿
Python
8
star
41

guangzhou-realtime-bus

广州实时公交API
Python
8
star
42

rust-vtk

VTK for rust, proof of concept.
C++
7
star
43

pyrenren

renren.com API binding. 人人网 API, python 版本. 非官方.
Python
7
star
44

dns_proxy

a dns local cache writen in erlang
Erlang
7
star
45

s3-presign

A minimal library for generating presigned URLs for Amazon S3 compatible services
Rust
6
star
46

epd

EPD
Rust
5
star
47

logseq-graph-of-greek-myth

5
star
48

JDStatusBarNotification

JDStatusBarNotification fork, Carthage compatiable
Objective-C
5
star
49

andelf.github.io

github pages
SCSS
5
star
50

text-image

A proc-macro to render text to raw image at compile time
Rust
5
star
51

scripts

some personal scripts. ignore it....
Shell
3
star
52

rust-httpc

An http client lib writen in rust. (former rust-http-helper)
Rust
3
star
53

Products.ChinaPak

Plone Chinese Translation and Chinese-freidendly tools
Python
3
star
54

tangnano9k-spinal.g8

Spinal Project template of Tang Nano 9K FPGA board
Scala
3
star
55

sadfarmer

伤心农民 一个开心农场辅助程序 . 已经不更新, 欢迎围观原理.
Python
3
star
56

lartc

git://repo.or.cz/lartc.git mirror
PHP
3
star
57

paopaoyu

A PaoPaoYu Client For Renren.com writen by python. 已经不更新. 欢迎围观原理.
Python
3
star
58

embedded-drivers

Embedded driver examples.
Rust
3
star
59

rust-mtl

Rust Matrix Library. Working in Progress.
Rust
2
star
60

erldupan

baidu net disk aka baidu yun. erlang client.
Erlang
2
star
61

tron-examples

Misc example code for TRON
JavaScript
2
star
62

codeplay

miscellaneous code
C++
2
star
63

pyictclas

Ictclas30 python binding
C++
2
star
64

rust-algorithm-design-analysis

Algorithms: Design and Analysis, MOOC by Stanford University@Coursera
Rust
2
star
65

imagegraw-rs

Rust
2
star
66

k210-playground-rs

Maixduino examples in Rust.
Rust
2
star
67

lm401-pro-kit

Rust Embassy projects for LM401-Pro-Kit (STM32WLE5)
Rust
2
star
68

hpm-hal

HAL crate for HPM5300 series RISC-V MCUs, HPM5361, HPM5331, HPM5321, HPM5301
Rust
2
star
69

picc

PICtureCrop, simple OCR + Screenshot tool
Rust
1
star
70

songci_tool

songci_tool: 瞎写宋词玩的。
Python
1
star
71

rust-sca

Rust
1
star
72

picopb

no_std protobuf parser
Rust
1
star
73

lsq-watcher

Rust
1
star
74

jffs2-tools

jffs2-tools
1
star
75

erlang-aiml

aiml engine, erlang version
Erlang
1
star
76

imagedraw-rs

Rust
1
star
77

clojure-cli

Clojure CLI in Rust
Rust
1
star
78

rust-swig

Working in Progress.
1
star
79

rust-steem

开个天坑吧
C++
1
star
80

Specs

Ruby
1
star
81

ecurl

erlang libcurl(curl) nif
C
1
star
82

notes

Personal Learning notes
1
star
83

try_git

1
star
84

andelf.github.com.old

my andelf.github.com page
1
star
85

hpm-flash-algo

Flash Algorithms for HPMicro's MCU
Rust
1
star
86

bl-rs

Rust
1
star
87

rust-pbc

Rust binding of the Pairing-Based Cryptography Library
Rust
1
star
88

pioc

The PIOC(Programmable Protocol I/O Microcontroller) of CH32X035/4/3 and CH643.
Rust
1
star