One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
package main | |
// #include <stdlib.h> | |
// | |
// extern void opa_abort(void *context, int32_t addr); | |
// extern int32_t opa_builtin0(void *context, int32_t builtin_id, int32_t ctx); | |
// extern int32_t opa_builtin1(void *context, int32_t builtin_id, int32_t ctx, int32_t arg0); | |
// extern int32_t opa_builtin2(void *context, int32_t builtin_id, int32_t ctx, int32_t arg0, int32_t arg1); | |
// extern int32_t opa_builtin3(void *context, int32_t builtin_id, int32_t ctx, int32_t arg0, int32_t arg1, int32_t arg2); | |
// extern int32_t opa_builtin4(void *context, int32_t builtin_id, int32_t ctx, int32_t arg0, int32_t arg1, int32_t arg2, int32_t arg3); |
go_file: decl_package [imports] ([decl_type] [decl_func])* | |
decl_package: "package" ident | |
imports: "import" single_import | |
| "import" multiple_imports | |
single_import: ["("] ESCAPED_STRING [")"] | |
multiple_imports: "(" ESCAPED_STRING+ ")" | |
stmt: stmt_var | |
| stmt_for | |
| stmt_if |
#!/bin/bash | |
# References | |
# http://www.computerhope.com/unix/nc.htm#03 | |
# https://github.com/daniloegea/netcat | |
# http://unix.stackexchange.com/questions/26715/how-can-i-communicate-with-a-unix-domain-socket-via-the-shell-on-debian-squeeze | |
# http://unix.stackexchange.com/questions/33924/write-inside-a-socket-open-by-another-process-in-linux/33982#33982 | |
# http://www.linuxjournal.com/content/more-using-bashs-built-devtcp-file-tcpip | |
# http://www.dest-unreach.org/socat/ | |
# http://stuff.mit.edu/afs/sipb/machine/penguin-lust/src/socat-1.7.1.2/EXAMPLES |
All these Gist files are explained on my Open API Specification (fka Swagger Specification) tutorial on API Handyman blog.
This tutorial is composed of several posts, here are the posts links and files used for each one:
package main | |
/* | |
#cgo CFLAGS: -x objective-c | |
#cgo LDFLAGS: -framework Cocoa | |
#import <Cocoa/Cocoa.h> | |
int | |
StartApp(void) { | |
[NSAutoreleasePool new]; |
#include <Cocoa/Cocoa.h> | |
extern void ButtonClick(void); | |
@interface GoPasser : NSObject | |
+ (void)buttonClick:(id)sender; // this should call the cgo function defined in main.go | |
@end | |
void StartApp(void); |
prompt $$ |