dongqiulei6805 2016-04-22 07:01
浏览 56
已采纳

去建立事件未定义

Environment: Windows 10 Professional 64-Bit.

I want to build / install a go-project (twitterbeat as you can see).

C:\apps\Go_workspace\src\github.com\buehler\twitterbeat>go build
# github.com/buehler/twitterbeat/beater
beater\twitterbeat.go:62: b.Events undefined (type *beat.Beat has no field or method Events)

Here you can see line 62 of the file:

func (bt *Twitterbeat) Setup(b *beat.Beat) error {
    logp.Info("Setup waitduration and api keys")

    bt.events = b.Events

    var err error
    bt.period, err = time.ParseDuration(*bt.beatConfig.Period)
    if err != nil {
        return err
    }

    anaconda.SetConsumerKey(*bt.beatConfig.Twitter.ConsumerKey)
    anaconda.SetConsumerSecret(*bt.beatConfig.Twitter.ConsumerSecret)
    bt.api = anaconda.NewTwitterApi(*bt.beatConfig.Twitter.AccessKey, *bt.beatConfig.Twitter.AccessSecret)

    return nil
}

I don't think that the code is wrong, because I donwloaded it directly from Github.

Because I am not on a linux / unix system (and I had problems with the proxy), i couldn't run "glide". Instead I donwloaded all dependencies by myself.

What can I do to build twitterbeat?

  • 写回答

2条回答 默认 最新

  • douxie1957 2016-04-22 07:50
    关注

    When you download the dependencies by hand, you need to make sure that they are the same version as in the glide.yaml file. The current version of beat.Beat in github.com/elastic/libbeat/beat/beat.go is newer than the one in the glide.yaml and doesn't have an Events field any more.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示
  • ¥15 求三国群英传pl国战时间的修改方法
  • ¥15 matlab代码代写,需写出详细代码,代价私