Skip to content

Instantly share code, notes, and snippets.

View softwarebygabe's full-sized avatar

Gabe Szczepanek softwarebygabe

View GitHub Profile
const async = require('async');
function run(cb) {
// do some fun stuff
cb();
}
async.forever(
(next) => {
run((err, res) => {
const cluster = require('cluster');
function start() {
if (cluster.isMaster) {
console.log('CLUSTER MASTER:: Starting worker process...');
cluster.fork();
// listen for disconnects and restart accordingly
package main
import (
"encoding/xml"
"fmt"
)
type Cat struct {
Name string
Breed string
package main
import (
"encoding/xml"
"fmt"
)
type Cat struct {
Name string `xml:"name"`
Breed string `xml:"breed"`
package main
import (
"encoding/xml"
"fmt"
)
type Cat struct {
XMLName xml.Name `xml:"cat"`
Name string `xml:"name"`
package main
import (
"encoding/xml"
"fmt"
)
type Cat struct {
XMLName xml.Name `xml:"cat"`
Name string `xml:"name,omitempty"`
package main
import (
"encoding/xml"
"fmt"
)
type Cat struct {
XMLName xml.Name `xml:"cat"`
Name string `xml:"name,omitempty"`
package main
import (
"encoding/xml"
"fmt"
)
type Cat struct {
XMLName xml.Name `xml:"cat"`
Name string `xml:"name,omitempty"`
package external
type Client struct{}
func NewClient() Client {
return Client{}
}
func (c Client) GetData() (string, error) {
return "data", nil
package foo
import (
"errors"
"interfaces/external"
)
func Controller() error {
externalClient := external.NewClient()