plugin

command
v0.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2023 License: BSD-3-Clause Imports: 8 Imported by: 0

README

tgun

here we harness go networking in a c program. at its most basic, fetching a url

compile with gcc -o example_error example_c/example_error.c -ltgun


#include <tgun.h>

// example usage
int using_tgun(char *url){
  char* b = get_url(url);
  if (!b) {
      // oops, theres an error string waiting
      printf("err: %s\n", tgunerr());
      return 1;
  }
  printf("%s\n", b); // print resp (its null terminated)
  free(b); // free when finished
  return 0;
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL