Giter VIP home page Giter VIP logo

go-blog-learn's Introduction

Links

https://eddycjy.com/posts/

go命令

  1. 开启GOMODEL、设置GOPROXY
  2. go mod init projectname 初始化项目
  3. go get url 添加依赖
  4. go mod tidy 检查&整理依赖

代码结构

go-gin-example/ ├── conf ├── middleware ├── models ├── pkg ├── routers └── runtime

  • conf: 存储配置文件
  • middleware: 应用中间件
  • models: 应用数据库模型
  • pkg: 第三方包
  • routers: 路由逻辑处理
  • runtime: 应用运行时数据

go模块

  1. import uri 引入网络依赖
  2. replace uri => otheruri 替换指定依赖为本地目录/其他网络地址. 支持相对路径
  3. 更换完依赖记得go mod tidy

go配置加载包

go get -u github.com/go-ini/ini

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.