回复: [go-nuts] Re: How to Unmarshal an XML document to a Map[string]string

2022-08-10 Thread 'Beyond' via golang-nuts
Thanks~ I have solved this problem -- 原始邮件 -- 发件人: "Kurtis Rader"https://pkg.go.dev/encoding/xml.   在2012年8月21日星期二 UTC+8 20:49:16https://github.com/clbanning/x2j On Friday, November 18, 2011 7:33:38 AM UTC-6, Nguyên Nguyễn Văn Cao wrote:Is there any way read a

Re: [go-nuts] Re: How to Unmarshal an XML document to a Map[string]string

2022-08-10 Thread Kurtis Rader
On Wed, Aug 10, 2022 at 6:51 PM 'wentao Xiong' via golang-nuts < golang-nuts@googlegroups.com> wrote: > Hello~ Why I code it hits: could not import xml (no required module > provides package "xml")? > Note that you are replying to a discussion thread that is ten years old. It is better to start a

Re: [go-nuts] Preemptive interfaces in Go

2022-08-10 Thread Robert Engels
I would say to temper judgement on both sides. If you’ve ever written or read Go code in an IDE and used “find implementors” you’ve seen the power of interface based design. Sure, you can still do this in Go - kind of - because an implementation may not be by design nor according to the semant

[go-nuts] Re: How to Unmarshal an XML document to a Map[string]string

2022-08-10 Thread 'wentao Xiong' via golang-nuts
Hello~ Why I code it hits: could not import xml (no required module provides package "xml")? 在2012年8月21日星期二 UTC+8 20:49:16 写道: > thank you, I will try it. > > Vào 02:12:03 UTC+7 Thứ ba, ngày 21 tháng tám năm 2012, clba...@gmail.com > đã viết: >> >> check out: https://github.com/clbanning/x2j > >

Re: [go-nuts] Preemptive interfaces in Go

2022-08-10 Thread 'Paolo Calao' via golang-nuts
On Mon, Aug 8, 2022 at 7:17 PM Tim Peoples wrote: > > For years I've read the old adage, "Accept interfaces, return structs" and > have spent years working to instill this understanding among my colleagues. > I gathered a great many skills while learning Go (and acquiring > readability) back in

Re: [go-nuts] Preemptive interfaces in Go

2022-08-10 Thread 'Dan Kortschak' via golang-nuts
On Wed, 2022-08-10 at 11:17 -0700, Mike Schinkel wrote: > In my experience having control over the implementation is not a > black-and-white thing, unless you are the sole developer on a > project. This also brings in the consideration of that if you have complete control over the implementation,

Re: [go-nuts] Preemptive interfaces in Go

2022-08-10 Thread Mike Schinkel
On Tuesday, August 9, 2022 at 3:52:13 PM UTC-4 t...@timpeoples.com wrote: > I've come to learn that my new shop is ... utilizing ... a complete > dependency injection framework and rather strict adherence to *Clean > Architecture*™ >

Re: [go-nuts] Go Mod SSH doesn't work

2022-08-10 Thread TheDiveO
Second the painful experience when having to work with company internal code repos. In addition to the git global rewriting rule and GOPRIVATE I use a PAC (personal access token) because that is required in my case. All this is extremely brittle, even more so when building container images, as

Re: [go-nuts] Preemptive interfaces in Go

2022-08-10 Thread Tim Peoples
Responses inline... On Wednesday, August 10, 2022 at 1:17:21 AM UTC-7 Henry wrote: > Someone mentioned that data is data and there is no need to hide > implementation details. If we are to use that reasoning, there is no need > for Go to allow un-exported fields/types/functions. Why do we need

Re: [go-nuts] Preemptive interfaces in Go

2022-08-10 Thread Henry
Someone mentioned that data is data and there is no need to hide implementation details. If we are to use that reasoning, there is no need for Go to allow un-exported fields/types/functions. Why do we need them at all? The reason for hiding implementation details is to narrow down the access po