Skip to content

Instantly share code, notes, and snippets.

@saltlakeryan
saltlakeryan / example.go
Last active January 5, 2021 17:47 — forked from lmammino/example.go
Ldap filter beautifier
package main
/*
Put ldap.go in ldap subdir
Run: go build example.go
Run: ./example < ldap-filter.txt
*/
import (
"fmt"

From "Beginning Backbone.js":

function Message(subject, recipient, content) {
  this.subject = subject;
  this.recipient = recipient;
  this.content = content;
}

Message.prototype.show = function(){

var ffi = require('ffi'),
ref = require('ref'),
Struct = require('ref-struct'),
Library = require('./Library'),
Type = ref.Type,
NULL = ref.NULL,
isNull = ref.isNull;
var groups = ['libs', 'types', 'structs', 'callbacks', 'enums'];