GithubHelp home page GithubHelp logo

gohellowworldforimport's Introduction

GoHellowWorldForImport

// Package 能做成套件給其他Go import的最小包

結論&要點

  • go.mod 中 module 應該為你的github路徑,這樣可以避免引用名稱不同的問題
    • 小版本更新使用tag來上傳,若有破壞性更新就在module 最後方加上/v2, v3等字樣
  • 檔名不要使用main.go 其餘應該都可以
  • package會是別人取用工具包的名稱

在你的包中使用這個方式來引入

import (
	"github.com/limiu82214/GoHellowWorldForImport"
)

在你的包中這樣使用此套件

GoHelloWorldForImport.SayIt()

gohellowworldforimport's People

Contributors

limiu82214 avatar

Watchers

James Cloos avatar  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.