Giter Site home page Giter Site logo

go-tutorial's People

Contributors

alice52 avatar dependabot[bot] avatar renovate[bot] avatar

Watchers

 avatar

go-tutorial's Issues

[setup] env

1. install go

  1. 下载安装文件: https://studygolang.com/dl

    wget https://storage.googleapis.com/golang/go1.13.4.linux-amd64.tar.gz
  2. 创建 /opt/go/sdk 目录

    mkdir -p /opt/go/sdk
    tar -zxvf go.*.gz ./
  3. 设置相关环境

    go env -w GO111MODULE=on
    go env -w GOPROXY=https://goproxy.cn,direct
  4. 创建相关环境变量及目录

    • 创建目录
    mkdir -p /opt/go/repo
    mkdir -p /opt/go/repo/workspace
    • 配置环境变量
    export GOPATH=/opt/go/repo # this dic will store third-party dependency
    export GOROOT=/opt/go/sdk # this do source code[sdk]
    export PATH=$GOPATH/bin:$PATH:$GOROOT/bin # expoer path
    • code struct
    |-- go
    |   |-- repo
    |   |   |-- bin
    |   |   |-- pkg
    |   |   `-- workspace  // 项目区域
    |   `-- sdk
    

2. upgrade go

  1. 获取目标版本的 SDK
    • dpkg --print-architecture || arch: look up arch
  2. 解压至 /opt/go/sdk/$VERSION
  3. 配置 .zshrc and /etc/profile
    • GOROOT
    • GOPATH

3. install goland

  1. ubuntu

  2. 完全删除: 重新获取适用机会

    # delete idea folder
    delete ~/.java/.userPrefsJetBrains/goland*
    delete ~/.config/JetBrains/goland*
    delete ~/.cache/JetBrains/goland*
  3. 导入配置

  4. 配置 goland

    • set GOROOT: directory of go sdk installed

    • set global GOPATH: xx/repo + this is wokrding code directory, it can be empty if use go mod

    • enable gomodule**: import

      image
      image

4. install vscode

  1. install below plugins

    plugin func
    Go Outliner --
    Go Doc --
    Go --
    Remote - SSH --
    Remote - SSH: Editing --
  2. 配置 GOPROXY="https://goproxy.cn,direct" 之后安装 Go Tools

    • ctrl+shift+p: 输入 go install tools 选 Go: Install/Update Tools

    image

  3. 可以使用云端开发机器

    • 将本地电脑的 ~/.ssh/id_rsa.pub 的值放入服务器的 ~/.ssh/authorized_keys
    • 使用 ssh 登录并保存相关授权信息

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • fix(deps): update module github.com/aliyun/fc-runtime-go-sdk to v0.2.10
  • fix(deps): update module gorm.io/gen to v0.3.26
  • fix(deps): update module github.com/gin-gonic/gin to v1.10.0
  • fix(deps): update module github.com/uptrace/opentelemetry-go-extra/otelzap to v0.3.1
  • fix(deps): update module go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp to v0.53.0
  • fix(deps): update opentelemetry-go monorepo to v1.28.0 (go.opentelemetry.io/otel, go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp, go.opentelemetry.io/otel/exporters/stdout/stdoutmetric, go.opentelemetry.io/otel/exporters/stdout/stdouttrace, go.opentelemetry.io/otel/metric, go.opentelemetry.io/otel/sdk, go.opentelemetry.io/otel/sdk/metric)
  • 🔐 Create all rate-limited PRs at once 🔐

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/build-awesome.yml
  • actions/checkout v4
  • WillAbides/setup-go-faster v1.14.0
.github/workflows/build-oss-proxy.yml
  • actions/checkout v4
  • WillAbides/setup-go-faster v1.14.0
  • actions/upload-artifact v4
  • actions/upload-artifact v4
.github/workflows/build-worktest.yml
  • actions/checkout v4
  • WillAbides/setup-go-faster v1.14.0
  • actions/upload-artifact v4
.github/workflows/commit-msg-checker.yml
  • ahmadnassri/action-commit-lint v2.1.17
  • ubuntu 22.04
gomod
tutorials/github.com/alice52/awesome/common/go.mod
  • go 1.19
tutorials/github.com/alice52/awesome/pkg/go.mod
  • go 1.19
  • github.com/go-playground/locales v0.14.1
  • github.com/go-playground/universal-translator v0.18.1
  • github.com/go-playground/validator/v10 v10.16.0
  • github.com/gookit/event v1.1.1
  • github.com/robfig/cron/v3 v3.0.1
  • github.com/sourcegraph/conc v0.3.0
  • github.com/uptrace/opentelemetry-go-extra/otelzap v0.2.4
  • go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0
  • go.opentelemetry.io/otel v1.24.0
  • go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0
  • go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.24.0
  • go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0
  • go.opentelemetry.io/otel/metric v1.24.0
  • go.opentelemetry.io/otel/sdk v1.24.0
  • go.opentelemetry.io/otel/sdk/metric v1.24.0
  • go.uber.org/zap v1.27.0
  • gopkg.in/natefinch/lumberjack.v2 v2.2.1
tutorials/github.com/alice52/awesome/pkg/gorm/go.mod
  • go 1.20
  • gorm.io/driver/mysql v1.5.2
  • gorm.io/gen v0.3.25
  • gorm.io/gorm v1.25.8
tutorials/github.com/alice52/awesome/syntax/v2/go.mod
  • go 1.19
  • github.com/stretchr/testify v1.8.4
  • golang.org/x/sync v0.5.0
tutorials/github.com/alice52/awesome/web/gin/go.mod
  • go 1.19
  • github.com/gin-gonic/gin v1.9.1
  • golang.org/x/sync v0.5.0
tutorials/github.com/alice52/awesome/web/gin_practice/go.mod
  • go 1.19
  • github.com/gin-gonic/gin v1.9.1
  • github.com/swaggo/files v1.0.1
  • github.com/swaggo/gin-swagger v1.6.0
  • github.com/swaggo/swag v1.16.2
tutorials/github.com/alice52/awesome/web/go-zero/go.mod
  • go 1.20
  • github.com/zeromicro/go-zero v1.6.1
tutorials/github.com/alice52/proxy/common/go.mod
  • go 1.20
tutorials/github.com/alice52/proxy/oss/go.mod
  • go 1.20
  • github.com/aliyun/aliyun-oss-go-sdk v3.0.1+incompatible
  • github.com/aliyun/fc-runtime-go-sdk v0.2.7
tutorials/github.com/alice52/proxy/sts/go.mod
  • go 1.20
tutorials/github.com/alice52/work_test/module_a/go.mod
  • go 1.20
tutorials/github.com/alice52/work_test/module_b/go.mod
  • go 1.20

  • Check this box to trigger a request for Renovate to run again on this repository

[goland] plugins

  1. CodeGeex
  2. Go ORM Helper
  3. Goanno
  4. sonarlint
  5. go linter
  6. JsonToGo
  7. Presentation Assistant for 2023.​2
  8. key Promoter X
  9. Struct-to-Struct
  10. CodeGlance3

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.