Moved to https://gitea.com/lunny/gop

GOP

简体中文

CircleCI codecov

GOP is a project manangement tool for building your golang applications out of global GOPATH. In fact gop will keep both global GOPATH and every project GOPATH. But that means your project will not go-getable. Of course, GOP itself is go-getable. GOP copy all denpendencies from global GOPATH to your project's src/vendor directory and all application's sources are also in src directory.

A normal process using gop is below:

git clone [email protected]:bac/aaa.git
cd aaa
gop ensure -g
gop build
gop test

Features

  • GOPATH compitable
  • Multiple build targets support
  • Put your projects out of global GOPATH

Installation

Please ensure you have installed the go command, GOP will invoke it on building or testing

go get github.com/lunny/gop

Directory structure

Every project should have a GOPATH directory structure and put a gop.yml int the root directory. This is an example project's directory tree.

<project root>
├── gop.yml
├── bin
├── doc
└── src
    ├── main
    │   └── main.go
    ├── models
    │   └── models.go
    ├── routes
    │   └── routes.go
    └── vendor
        └── github.com
            ├── go-xorm
            │   ├── builder
            │   ├── core
            │   └── xorm
            └── lunny
                ├── log
                └── tango

Gop.yml

Gop will recognize a gop project which has gop.yml. The file is also a project configuration file. Below is an example. If you didn't define any target, the default target is src/main and the target name is the project name.

targets:
- name: myproject1
  dir: main
  assets:
  - templates
  - public
  - config.ini
  - key.pem
  - cert.pem
- name: myproject2
  dir: web
  assets:
  - templates
  - public
  - config.ini
  monitors:
  - config.ini

Command

init

Create the default directory structure tree.

mkdir newproject
cd newproject
gop init

and you can also create config file for vscode

gop init -e=vscode

ensure

Automatically copy dependencies from $GOPATH to local project directory. -g will let you automatically call go get <package> when the package is missing on GOPATH. -u will always go get <package> on all the dependencies and copy them to vendor.

gop ensure [-g|-u] [target_name]

status

List all dependencies of this project and show the status.

gop status [target_name]

add

Add one or more packages to this project.

gop add <package1> <package2>

update

Update one or more packages to this project. All missing dependent packages will also be added. -f will update exists dependent packages.

gop update [-f] <package1> <package2>

rm

Remove one or more packages from this project.

gop rm <package1> <package2>

build

Run go build on the src directory. If you want to execute ensure before build, you can use -e flag.

gop build [-e] [target_name]

run

Run go run on the src directory. -w will monitor the go source code changes and automatically build and run again. -e will automatically execute ensure before every time build.

gop run [-w] [target_name]

test

Run go test on the src directory. If you want to execute ensure before build, you can use -e flag.

gop test [-e] [target_name]

release

Run go release on the src directory.

gop release [target_name]

TODO

  • Versions support, specify a dependency package verison
  • Support run gop in GOPATH
Owner
Similar Resources

MOVED TO GITLAB

MOVED TO GITLAB

blanket blanket is a tool that helps you catch functions which don't have direct unit tests in your Go packages. Installation go get -u gitlab.com/ver

Nov 27, 2022

DEPRECATED (moved to tendermint/tendermint): Golang P2P library

tendermint/go-p2p tendermint/go-p2p provides an abstraction around peer-to-peer communication. Peer/MConnection/Channel Each peer has one MConnection

Nov 9, 2022

*DEPRECATED* Please use https://gopkg.in/redsync.v1 (https://github.com/go-redsync/redsync)

Redsync.go This package is being replaced with https://gopkg.in/redsync.v1. I will continue to maintain this package for a while so that its users do

Nov 20, 2022

Decode mp3 base on https://github.com/lieff/minimp3

minimp3 Decode mp3 base on https://github.com/lieff/minimp3 See examples in example directory. make and make test test the example. package main impo

Dec 25, 2022

A Go library for doing header-based OAuth over HTTP or HTTPS.

Installation goinstall github.com/alloy-d/goauth Usage import ( "github.com/alloy-d/goauth" "os" ) func someFuncThatDoesStuffWithOAuth() (er

Sep 2, 2020

go implementation of lightbend's HOCON configuration library https://github.com/lightbend/config

HOCON (Human-Optimized Config Object Notation) Configuration library for working with the Lightbend's HOCON format. HOCON is a human-friendly JSON sup

Dec 3, 2022

A Go library for an efficient implementation of a skip list: https://godoc.org/github.com/MauriceGit/skiplist

A Go library for an efficient implementation of a skip list: https://godoc.org/github.com/MauriceGit/skiplist

Fast Skiplist Implementation This Go-library implements a very fast and efficient Skiplist that can be used as direct substitute for a balanced tree o

Dec 30, 2022

Goose database migration tool - fork of https://bitbucket.org/liamstask/goose

goose Goose is a database migration tool. Manage your database schema by creating incremental SQL changes or Go functions. Goals of this fork github.c

Dec 30, 2022

Bigfile -- a file transfer system that supports http, rpc and ftp protocol https://bigfile.site

Bigfile -- a file transfer system that supports http, rpc and ftp protocol   https://bigfile.site

Bigfile ———— a file transfer system that supports http, rpc and ftp protocol 简体中文 ∙ English Bigfile is a file transfer system, supports http, ftp and

Dec 31, 2022

:warning: Deprecrated in favor of https://github.com/piquette/finance-go

go-finance go-finance is a Go library for retrieving financial data for quantitative analysis. Deprecation Warning! This library will no longer be mai

Dec 14, 2022

Openldap (LDAP) binding for Golang (go) ; no more support ; you may have a look at https://github.com/go-ldap/ldap

OpenLDAP this is Openldap binding in GO language. I don't work any more with golang, so, please fork this project. Installation : Installation is easy

Mar 4, 2021

An Etsy StatsD (https://github.com/etsy/statsd) implementation in Go

STATSD-GO Port of Etsy's statsd, written in Go. This was forked from https://github.com/amir/gographite to provide Ganglia submission support. USAGE U

Mar 5, 2021

tiny linear interpolation library for go (factored out from https://github.com/sgreben/yeetgif)

piecewiselinear A tiny library for linear interpolation. O(log(N)) per evaluation for N control points. import "github.com/sgreben/piecewiselinear" Ge

Sep 27, 2022

auto-generate capnproto schema from your golang source files. Depends on go-capnproto-1.0 at https://github.com/glycerine/go-capnproto

bambam: auto-generate capnproto schema from your golang source files. Adding capnproto serialization to an existing Go project used to mean writing a

Sep 27, 2022

Cap'n Proto library and parser for go. This is go-capnproto-1.0, and does not have rpc. See https://github.com/zombiezen/go-capnproto2 for 2.0 which has rpc and capabilities.

Version 1.0 vs 2.0 Update 2015 Sept 20: Big news! Version 2.0 of the go-bindings, authored by Ross Light, is now released and newly available! It feat

Nov 29, 2022

Fast, multi-platform web server with automatic HTTPS

Fast, multi-platform web server with automatic HTTPS

a project Every site on HTTPS Caddy is an extensible server platform that uses TLS by default. Releases · Documentation · Get Help Menu Features Insta

Jan 1, 2023

HTTP mock for Golang: record and replay HTTP/HTTPS interactions for offline testing

govcr A Word Of Warning I'm in the process of partly rewriting govcr to offer better support for cassette mutations. This is necessary because when I

Dec 28, 2022
This is only a mirror and Moved to https://gitea.com/lunny/tango

Tango 简体中文 Package tango is a micro & pluggable web framework for Go. Current version: v0.5.0 Version History Getting Started To install Tango: go get

Nov 18, 2022
Simple and Powerful ORM for Go, support mysql,postgres,tidb,sqlite3,mssql,oracle, Moved to https://gitea.com/xorm/xorm

xorm HAS BEEN MOVED TO https://gitea.com/xorm/xorm . THIS REPOSITORY WILL NOT BE UPDATED ANY MORE. 中文 Xorm is a simple and powerful ORM for Go. Featur

Jan 3, 2023
Moved https://gitea.com/xweb/xweb

xweb xweb是一个强大的Go语言web框架。 English 技术支持 QQ群:369240307 更新日志 v0.2.1 : 自动Binding新增对jquery对象,map和array的支持。 v0.2 : 新增 validation 子包,从 https://github.com/ast

Apr 21, 2022
Moved https://gitea.com/xweb/xweb

xweb xweb是一个强大的Go语言web框架。 English 技术支持 QQ群:369240307 更新日志 v0.2.1 : 自动Binding新增对jquery对象,map和array的支持。 v0.2 : 新增 validation 子包,从 https://github.com/ast

Apr 21, 2022
🔥 Golang live stream lib/client/server. support RTMP/RTSP/HLS/HTTP[S]-FLV/HTTP-TS, H264/H265/AAC, relay, cluster, record, HTTP API/Notify, GOP cache. 官方文档见 https://pengrl.com/lal
🔥 Golang live stream lib/client/server. support RTMP/RTSP/HLS/HTTP[S]-FLV/HTTP-TS, H264/H265/AAC, relay, cluster, record, HTTP API/Notify, GOP cache. 官方文档见 https://pengrl.com/lal

lal是一个开源GoLang直播流媒体网络传输项目,包含三个主要组成部分: lalserver:流媒体转发服务器。类似于nginx-rtmp-module等应用,但支持更多的协议,提供更丰富的功能。lalserver简介 demo:一些小应用,比如推、拉流客户端,压测工具,流分析工具,调度示例程序等

Jan 1, 2023
:exclamation::exclamation::exclamation: [deprecated] Moved to https://github.com/go-macaron/macaron
:exclamation::exclamation::exclamation: [deprecated] Moved to https://github.com/go-macaron/macaron

Macaron Package macaron is a high productive and modular web framework in Go. Current version: 0.6.8 Getting Started The minimum requirement of Go is

Aug 20, 2021
:exclamation::exclamation::exclamation: [deprecated] Moved to https://github.com/go-macaron/macaron
:exclamation::exclamation::exclamation: [deprecated] Moved to https://github.com/go-macaron/macaron

Macaron Package macaron is a high productive and modular web framework in Go. Current version: 0.6.8 Getting Started The minimum requirement of Go is

Aug 20, 2021
High performance Copy-on-write gop cache code

PLEASE USE joy5 INSTEAD joy5 High performance Copy-on-write gop cache code Better av.Packet design code JOY4 Golang audio/video library and streaming

Jun 24, 2022
The official CLI for Gitea
The official CLI for Gitea

The official CLI for Gitea

Mar 8, 2022