go-nano

command module
v0.0.0-...-3a105dc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2016 License: MIT Imports: 9 Imported by: 0

README

go-nano

golang implementation of nano

Installation

First you have to get gorram as the plugin system requires it.

go get npf.io/gorram/cli

Then get discordgo

go get github.com/bwmarrin/discordgo

Usage

in the config.json file you add the plugins, the discord information, the functions, and the name of the function. You can give the function an alias. You also specify which package it is in (required!).

Create a new folder in your GOPATH/src and name it nano in the new folder you add another folder called plugins, and in there you add the plugins you want. All plugins require a new folder, unless they belong to the same package. Check the main.go file for how things work (documentation to be added).

You also need to change a few lines of code in the gorram source, in the cli.Run function, you have to add a []string, args ...string to the parameters, so it looks like this: func Run(a []string, args ...string) {...}

Next, in the body of the function you have to change the following:

in the env initialization, change the Args property to look like this: Args: make([]string, len(args)+len(a)), below the initialization add args = append(args, a...), and change the copy line to look like this: copy(env.Args, args). Leave everything else as is, and you're good to go.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
example-plugins

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL