Git Product home page Git Product logo

scarecrow's People

Contributors

kirsle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

scarecrow's Issues

Use an interface registration system for listeners

Currently the listener system doesn't use Golang interfaces, and the main bot code has to include specific logic to know about and configure each listener.

Instead, listeners should implement the Listener interface and use a registration function to make themselves available and known to the bot.

Something roughly along the lines of...

type Listener interface {
    Name() string
    New(types.ListenerConfig) *Listener
    Start()
}

var RegisteredListeners map[string]Listener

func RegisterInterface(name string, impl *Listener) {
    RegisteredListeners[name] = impl
}

ERR: Object Not Found for call

./scarecrow-cli

[INFO] Scarecrow version 1.0.0 is starting...
[INFO] Loading config: bots.json
[INFO] Setting up Slack listener...
[INFO] Setting up Console listener...
You> add 3 and 1
MomoBot> 3 + 1 = [ERR: Object Not Found]

sh-3.2# go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH=""
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GO15VENDOREXPERIMENT=""
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"
CXX="clang++"
CGO_ENABLED="1"

Implement Godep

Add support for Godep to manage the third-party dependencies, such as Slack and Readline, to prevent the build from breaking in the future if one of these dependencies is updated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.