Giter Site home page Giter Site logo

ghaoo / rboot Goto Github PK

View Code? Open in Web Editor NEW
68.0 3.0 16.0 407 KB

Rboot 是一个Go语言开发的一个简单、高效的 Chatops bot 框架

License: MIT License

Go 97.96% Batchfile 0.02% Shell 1.71% PHP 0.22% Python 0.09%
chatops chatbot bot chatops-bot

rboot's Issues

.env

配置了.env 文件不生效

脚本支持传入参数

脚本类型的插件怎么支持获取用户传入参数呢?
看了一下注册的脚本的runcommand方法.参数是从yaml文件中获取的.也就是只能写死在yaml文件中.
能否象plugin一样从 incoming message["args"] 中获取呢

变量怎么传呢

请问一下,我想执行脚本的时候传参数,有没有办法实现呢。接受消息的时候有没有办法吧参数接受过来呢

Potential import collision: import path should be "gopkg.in/yaml.v2", not "github.com/go-yaml/yaml".

Background

The go-yaml/yaml has already renamed it’s import path from "github.com/go-yaml/yaml" to "gopkg.in/yaml.v2".
As README of go-yaml/yaml v2.1.0 said, downstream repos should use "gopkg.in/yaml.v2" to get or import go-yaml/yaml.

Example
Some more examples can be found in the "examples" folder.

package main
import (
        "fmt"
        "log"
        "gopkg.in/yaml.v2"
)
…

But ghaoo/rboot still used the old path:
https://github.com/ghaoo/rboot/blob/master/go.mod#L11

github.com/go-yaml/yaml v2.1.0+incompatible 

When you use the old path "github.com/go-yaml/yaml" to import the go-yaml/yaml, it will be very easy to reintroduce go-yaml/yaml through the import statements "import gopkg.in/yaml.v2" in the go source file of go-yaml/yaml.
https://github.com/go-yaml/yaml/blob/v2.1.0/decode_test.go#L12

package yaml_test
import (
	…
	. "gopkg.in/check.v1"
	"gopkg.in/yaml.v2"
)

The "gopkg.in/yaml.v2" and "github.com/go-yaml/yaml" are the same repos. This will work in isolation, bring about potential risks and problems.
So, why not get rid of the old import path "github.com/go-yaml/yaml", use "gopkg.in/yaml.v2" instead.

Solution

Replace all the old import paths, change "github.com/go-yaml/yaml" to "gopkg.in/yaml.v2".
Where did you import it: https://github.com/ghaoo/rboot/search?q=github.com%2Fgo-yaml%2Fyaml&unscoped_q=github.com%2Fgo-yaml%2Fyaml

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.