Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Oct 19, 2023

docs/go.mod Outdated
github.com/imfing/hextra v0.5.0 // indirect
github.com/thegeeklab/hugo-geekdoc v0.41.2 // indirect
)
go 1.20
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could even remove the version, but looks like go mod tidy wants to add "something" back. Technically "any" version would work, so we could set it to something really low.

Copy link
Member

@milosgajdos milosgajdos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense.

@Jamstah
Copy link
Collaborator

Jamstah commented Oct 19, 2023

This is probably just my lack of go experience, but, why do we have a go.mod in the docs package at all when there is no code there?

@thaJeztah
Copy link
Member Author

Perhaps it needs a comment; this is used to facilitate Hugo's feature to vendor documentation from multiple repositories; Hugo has a feature to get documentation "modules" from repositories, and it uses the Go modules logic for that; https://gohugo.io/hugo-modules/

The docker documentation currently uses this to combine docs from multiple sources (see https://github.com/docker/docs/blob/main/go.mod)

I guess the added benefit is that vendoring distribution/distribution will skip the docs directory (as it's not in the main module)

@dvdksn may be able to provide more details if needed

@milosgajdos milosgajdos requested a review from Jamstah October 19, 2023 10:14
Copy link
Collaborator

@Jamstah Jamstah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No harm and supports other workflows, so why not.

A comment somewhere would be nice, maybe in the README.md for the docs?

@milosgajdos
Copy link
Member

@dvdksn would you mind opening a PR that updates the docs that explain this so that whoever picks up some docs related work doesn't have to ask the same questions 😄

@dvdksn
Copy link
Contributor

dvdksn commented Oct 19, 2023

Just checked and the go.mod and go.sum are not needed in the docs directory on this repo. They were generated when I was experimenting with different themes for the Hugo site here, but the theme we're using now doesnt use hugo modules. So both files can be safely deleted.

@milosgajdos
Copy link
Member

@thaJeztah do you wanna delete those files as per @dvdksn comment?

@milosgajdos
Copy link
Member

Ping @thaJeztah RE: my and @dvdksn's last comments

This go.mod was used to allow vendoring the docs with Hugo, but this
was never used, so we can remove the go.mod altogether.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah changed the title docs: align go version in go.mod and tidy docs: remove unused go.mod Nov 1, 2023
@thaJeztah
Copy link
Member Author

whoops, missed your ping; updated and removed the go.mod and go.sum from the docs directory 👍

@milosgajdos milosgajdos merged commit c1005c5 into distribution:main Nov 1, 2023
@thaJeztah thaJeztah deleted the fix_gomod_version branch November 1, 2023 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants