go-curl

golang curl(libcurl) binding.

  • 所有者: andelf/go-curl
  • 平台:
  • 許可證: Apache License 2.0
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

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)
    }
}

主要指標

概覽
名稱與所有者andelf/go-curl
主編程語言Go
編程語言C (語言數: 3)
平台
許可證Apache License 2.0
所有者活动
創建於2011-10-08 01:50:05
推送於2025-03-12 01:45:46
最后一次提交2025-03-12 09:45:44
發布數1
最新版本名稱compatible-with-go-release.r60 (發布於 )
第一版名稱compatible-with-go-release.r60 (發布於 )
用户参与
星數502
關注者數23
派生數133
提交數145
已啟用問題?
問題數58
打開的問題數22
拉請求數24
打開的拉請求數6
關閉的拉請求數4
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?