Giter VIP home page Giter VIP logo

mod_demo's Introduction

Go Module Demo

这是一个单一仓库,它的package是private.me/show是一个不可以被引用的URL。

Note: 如果需要提供库,当然它可以是一个真实可以引用的URL。

建议迁移到Go Module,主要原因是:

  1. 代码不用必须放GOPATH,可以放在任何目录,终于不用做软链了。
  2. Module依然可以用vendor,如果不需要更新依赖,可以不必从远程下载依赖代码,同样不必放GOPATH。
  3. 如果在一个仓库可以直接引用,会自动识别模块内部的package,同样不用链接到GOPATH。

Usage

Step 1: 下载本Demo,并运行程序:

git clone https://github.com/winlinvip/mod_demo.git &&
cd mod_demo && go run app/main.go

Step 2(optional): 以vendor方式运行,不需要下载依赖,使用vendor的代码:

go run -mod=vendor app/main.go

Step 3(optional): 运行单测和收集覆盖率:

go test -mod=vendor ./... -cover -coverprofile out.cover && 
go tool cover -html=out.cover

2019.10

mod_demo's People

Contributors

winlinvip avatar

Stargazers

吴挡 avatar

Watchers

 avatar

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.