go.mod supplement package

This is a continuation of the previous .

[go.mod]


module example.com

go 1.15

require github.com/labstack/echo/v4 v4.1.17

Top of go.mod above

module example.com


 This is the name when you import and use your own package!
 In the case of a project with the following configuration ↓

test
 |--samplea--aaaaa.go
 |--sampleb--bbbbb.go
 |--main.go
 |--go.mod
 |--go.sum


#### **`[main.go]`**
```go]


package main

import(
"example.com/samplea"
"example.com/sampleb"
)

Use it like this. If you want the directory name to be the same as the module name

[go.mod]


module test

To

Recommended Posts

go.mod supplement package