Coder Social home page Coder Social logo

go-curl's Introduction

go-curl

my golang libcurl(curl) binding.

  • under active development
  • by andelf

See more examples in ./examples/ directory~!

Current Development Statue

  • 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

$ goinstall github.com/andelf/go-curl/curl

Current Status

  • Linux x64
    • passed go release.r59 9022 (arch pacman)
    • passed go release.r60 9481 (arch pacman)
    • failed go release.r60.3 9516 (arch pacman, crosscall2: not defined)
    • passed go weekly.2011-10-18 10143 (gcc, hg repo)
    • passed go weekly.2011-10-18 10143 (clang, hg repo)
  • Windows x86
    • passed go release.r60.3 9516 (win7, mingw-gcc 4.5.2)

Sample Program

package main

import (
    "fmt"
    "github.com/andelf/go-curl/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)
    }
}

go-curl's People

Contributors

andelf avatar

Stargazers

Alex Guerrero avatar  avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.