On 26 Mar 2023, at 20:01, Kamil Ziemian <kziemian...@gmail.com> wrote:

But I cannot understand why in the blog post we have in go.mod file
require rsc.io/quote<http://rsc.io/quote> v1.5.2
so "rsc.io/quote<http://rsc.io/quote>" is considered direct dependency, while 
go.mod produced by Go 1.20 give me
rsc.io/quote<http://rsc.io/quote> v1.5.2 // indirect
so now "rsc.io/quote<http://rsc.io/quote>" is indirect dependency, even when I 
write in package
import "rsc.io/quote<http://rsc.io/quote>”

That doesn’t happen for me though:

% cat hello.go
package hello

import "rsc.io/quote"

func Hello() string {
    return quote.Hello()
}

% go mod init example.com/hello
go: creating new go.mod: module example.com/hello
go: to add module requirements and sums:
go mod tidy

% go mod tidy
go: finding module for package rsc.io/quote
go: found rsc.io/quote in rsc.io/quote v1.5.2

% cat go.mod
module example.com/hello

go 1.20

require rsc.io/quote v1.5.2

require (
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c // indirect
rsc.io/sampler v1.3.0 // indirect
)

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/067B34F7-F369-4622-8CBD-5BE3BA44DC3C%40kastelo.net.

Reply via email to