--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>goDBHammer</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ </buildSpec>
+ <natures>
+ </natures>
+</projectDescription>
--- /dev/null
+// um yes... its a db connector
\ No newline at end of file
--- /dev/null
+package dbibridge
+
+import "fmt"
+
+func dbiconnect()
+{
+ fmt.Printf("Hello, world\n");
+}
--- /dev/null
+package dbibridge
+
+// #include <stdio.h>
+// #include <dbi/dbi.h>
+import "C"
+
+import (
+ "unsafe";
+)
+
+func dbiconnect()
+{
+
+ C.dbi_initialize(nil);
+
+ myVar := C.dbi_conn_new(C.CString("mysql"));
+
+ C.dbi_conn_set_option((unsafe.Pointer)(myVar), C.CString("host"), C.CString("localhost"));
+ C.dbi_conn_set_option((unsafe.Pointer)(myVar), C.CString("username"), C.CString("your_name"));
+ C.dbi_conn_set_option((unsafe.Pointer)(myVar), C.CString("username"), C.CString("your_name"));
+ C.dbi_conn_set_option((unsafe.Pointer)(myVar), C.CString("password"), C.CString("your_password"));
+ C.dbi_conn_set_option((unsafe.Pointer)(myVar), C.CString("dbname"), C.CString("your_dbname"));
+ C.dbi_conn_set_option((unsafe.Pointer)(myVar), C.CString("encoding"), C.CString("UTF-8"));
+ C.dbi_conn_connect((unsafe.Pointer)(myVar));
+
+
+
+}
--- /dev/null
+rm -f *.cgo[1234].* *.so *.o *.a *.8
+cgo dbibridge.go
+
+8g -o _dbibridge_.8 dbibridge.cgo1.go dbibridge.cgo2.go
+8c -FVw -I/export/src/external/golang//src/pkg/runtime dbibridge.cgo3.c
+gopack grc dbibridge.a _dbibridge_.8 dbibridge.cgo3.8
+#cp dbibridge.a /export/src/external/golang//pkg/linux_386/dbibridge.a
+gcc -m32 -fPIC -O2 -o dbibridge.cgo4.o -c dbibridge.cgo4.c
+gcc -m32 -shared -lpthread -lm -o dbibridge.so dbibridge.cgo4.o
+#cp dbibridge.so /export/src/external/golang//pkg/linux_386/./dbibridge.so
+
+
+
+8g -I. webconnector.go
+8l webconnector.8
--- /dev/null
+// im a web connector
+
+package main
+
+
+import (
+ "http";
+ "io";
+ "./dbibridge";
+)
+
+// hello world, the web server
+func HelloServer(c *http.Conn, req *http.Request) {
+ io.WriteString(c, "<html><form method=post><input type=\"input\"><input type=\"submit\" name=\"go\" value=\"go\"></html>\n");
+}
+
+func main() {
+ dbibridge.dbiconnect();
+ http.Handle("/hello", http.HandlerFunc(HelloServer));
+ err := http.ListenAndServe(":12345", nil);
+ if err != nil {
+ panic("ListenAndServe: ", err.String())
+ }
+
+}