Giter Site home page Giter Site logo

xgo-cqhttp's Introduction

xgo-cqhttp - Custom Go-cqhttp Builder

This command line tool and associated Go package makes it easy to make custom builds of the go-cqhttp.

Requirements

Install

You can download binaries that are already compiled for your platform from the Release tab.

You may also build xgo-cqhttp from source:

$ go install github.com/RomiChan/xgo-cqhttp/cmd/xgo-cqhttp@latest

Command usage

The xgo-cqhttp command has two primary uses:

  1. Compile custom xgo-cqhttp binaries
  2. A replacement for go run while developing go-cqhttp plugins

The xgo-cqhttp command will use the latest version of go-cqhttp by default. You can customize this for all invocations by setting the GOCQHTTP_VERSION environment variable.

As usual with go command, the xgo-cqhttp command will pass the GOOS, GOARCH, and GOARM environment variables through for cross-compilation.

Custom builds

Syntax:

$ xgo-cqhttp build [<gocq_version>]
    [--output <file>]
    [--with <module[@version][=replacement]>...]
  • <gocq_version> is the core go-cqhttp version to build; defaults to GOCQHTTP_VERSION env variable or latest.
  • --output changes the output file.
  • --with can be used multiple times to add plugins by specifying the Go module name and optionally its version, similar to go get. Module name is required, but specific version and/or local replacement are optional.

Examples:

$ xgo-cqhttp build \
    --with github.com/Mrs4s/go-cqhttp/db/mongodb

$ xgo-cqhttp build v1.0.0-rc1 \
    --with github.com/Mrs4s/go-cqhttp/db/[email protected]

$ xgo-cqhttp build \
    --with github.com/Mrs4s/MiraiGo=../../my-fork

$ xgo-cqhttp build \
    --with github.com/Mrs4s/[email protected]=../../my-fork

You can even replace go-cqhttp core using the --with flag:

$ xgo-cqhttp build \
    --with github.com/Mrs4s/go-cqhttp=../../my-go-cqhttp-fork

This allows you to hack on go-cqhttp core (and optionally plug in extra modules at the same time!) with relative ease.

© 2020 Matthew Holt; Modified by Team RomiChan

xgo-cqhttp's People

Contributors

ansrivas avatar dunglas avatar francislavoie avatar fumiama avatar ggicci avatar ishkong avatar jaysonsantos avatar jpughcs avatar mholt avatar mohammed90 avatar simnalamburt avatar wdvxdr1123 avatar wolfogre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

yyur1nnnn

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.