Use Go Modules for dependency management #17

Open
opened 2021-04-09 18:06:47 +03:00 by gytisrepecka · 1 comment
Owner

Use Go Modules - Go's dependency management system.

First uses here: aceb90949a

Use [Go Modules](https://blog.golang.org/using-go-modules) - Go's dependency management system. First uses here: aceb90949af56baa1f3343bf9f66c87d14c62b6d
Author
Owner

Initialize modules:

go mod init code.gyt.is/webimg

File go.mod will be created, it will contain Go module name and version:

module code.gyt.is/webimg

go 1.16

To download dependencies and generate go.sum:

go mod tidy

At this point go.mod will be updated as well - require section (see

Line 5 in aceb909
require github.com/disintegration/imaging v1.6.2

line) is written.

Dependencies can be easily listed by using:

go list -m all
Initialize modules: ```bash go mod init code.gyt.is/webimg ``` File `go.mod` will be created, it will contain Go module name and version: ```plain module code.gyt.is/webimg go 1.16 ``` To download dependencies and generate `go.sum`: ```bash go mod tidy ``` At this point `go.mod` will be updated as well - `require` section (see https://source.gyt.is/gytisrepecka/webimg/src/commit/aceb90949af56baa1f3343bf9f66c87d14c62b6d/go.mod#L5 line) is written. Dependencies can be easily listed by using: ```bash go list -m all ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: gytisrepecka/webimg#17
No description provided.