Home > Backend Development > Golang > 'go mod init example.com/m' initialize v0 or v1 module

'go mod init example.com/m' initialize v0 or v1 module

王林
Release: 2024-02-13 17:50:08
forward
596 people have browsed it

\'go mod init example.com/m\' 初始化 v0 或 v1 模块

php editor Xiaoxin will introduce to you a simple and practical command-'go mod init example.com/m'. This command is used to initialize a v0 or v1 module, which can help developers quickly create and manage their own Go projects. By using this command, developers can easily start a new project and can easily introduce and manage dependencies. Whether you are a beginner or an experienced developer, you can improve development efficiency and better organize and manage your projects by using this command.

Question content

I am studying at https://youtu.be/ma7rus_vw9m?t=73

video

My environment

d:\temp2023_03_01\go\src>go version
go version go1.20.1 windows/amd64
Copy after login

My Action

Microsoft Windows [Version 10.0.22621.1265]
(c) Microsoft Corporation. All rights reserved.

D:\temp2023_03_01\go\src\github.com\robbyklein\go-jwt>go mod init
go: cannot determine module path for source directory D:\temp2023_03_01\go\src\github.com\robbyklein\go-jwt (outside GOPATH, module path must be specified)

Example usage:
        'go mod init example.com/m' to initialize a v0 or v1 module
        'go mod init example.com/m/v2' to initialize a v2 module

Run 'go help mod init' for more information.

D:\temp2023_03_01\go\src\github.com\robbyklein\go-jwt>
Copy after login

Why are my results different from the video? What do I do with archived results like videos?

Solution

D:\temp2023_03_01\go\src>go mod init github.com/robbyklein/go-jwt
go: creating new go.mod: module github.com/robbyklein/go-jwt
Copy after login

The above is the detailed content of 'go mod init example.com/m' initialize v0 or v1 module. For more information, please follow other related articles on the PHP Chinese website!

source:stackoverflow.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template