[go-nuts] Please update the url of golang tour for Korean.

2020-08-19 Thread 박진수
Hi golang-nuts. I'm Jinsu, a Korean Go developer. I've been reading "a tour of go" and tried reading its Korean version. But as soon as I tried, I realized there was no available Korean go tour. As you can see in this open issue(#709 tour: outdated tour version for korean translation), it

Re: [go-nuts] How to find repeated string?

2020-08-19 Thread Brian Candler
Here's one way to do adjacent repeats. https://play.golang.org/p/402UEPtIkfw But if you don't understand regular expressions, this could be done more simply by: - finding the first occurrence of substr - advancing the offset to just after the end of the match - check if substr appears at the new

Re: [go-nuts] Re: Share GOMODCACHE between unix users

2020-08-19 Thread Marcin Romaszewicz
Yes, each user would populate their own module cache locally if using your own proxy. On Wed, Aug 19, 2020 at 10:04 AM wilk wrote: > On 19-08-2020, Marcin Romaszewicz wrote: > > --71f06b05ad3dc9f8 > > Content-Type: text/plain; charset="UTF-8" > > > > I have many users building Go at

Re: [go-nuts] more simple modules usage questions

2020-08-19 Thread Kurtis Rader
On Wed, Aug 19, 2020 at 12:12 PM 'K Richard Pixley' via golang-nuts < golang-nuts@googlegroups.com> wrote: > I have two local git repositories. Both are go modules. Call them, > foo.com/one and foo.com/two. Both have go.mod files declaring themselves > to be, respectively, foo.com/one and foo.c

[go-nuts] more simple modules usage questions

2020-08-19 Thread 'K Richard Pixley' via golang-nuts
I have two local git repositories.  Both are go modules.  Call them, foo.com/one and foo.com/two.  Both have go.mod files declaring themselves to be, respectively, foo.com/one and foo.com/two based on go 1.15. I want to use a package from one in the other. import "foo.com/one/pkg/thing1"

Re: [go-nuts] [generics] Type list syntax

2020-08-19 Thread Frederik Zipp
Ian Lance Taylor schrieb am Mittwoch, 19. August 2020 um 00:39:16 UTC+2: > Yes, but here you are assigning the value struct{}{} to the type S. > That's not how type arguments work: type arguments are not assigned to > type parameters. Instead, the body of a generic function or type is > instant

[go-nuts] Re: Share GOMODCACHE between unix users

2020-08-19 Thread wilk
On 19-08-2020, Marcin Romaszewicz wrote: > --71f06b05ad3dc9f8 > Content-Type: text/plain; charset="UTF-8" > > I have many users building Go at my company, and instead of sharing the > module cache on the filesystem, a much better approach is to use a caching > module proxy, such as Athe

Re: [go-nuts] Share GOMODCACHE between unix users

2020-08-19 Thread Marcin Romaszewicz
I have many users building Go at my company, and instead of sharing the module cache on the filesystem, a much better approach is to use a caching module proxy, such as Athens (https://github.com/gomods/athens). See the documentation for the GOPROXY environment variable. -- Marcin On Wed, Aug 19

[go-nuts] [CODE REVIEW] How to improve structure of Service and DAO Layers

2020-08-19 Thread Karan Singh
I am having a bit of difficulty in designing my Go code. I'll try to demonstrate things with a very simple example of adding a new user to the database. I have 3 major components in this example: a handler, a service and a dao layer. 1. My Handler is only doing one thing: Calling a

[go-nuts] Share GOMODCACHE between unix users

2020-08-19 Thread wilk
Hi, I would like to have a global GOMODCACHE for all unix users, or a group of users to gain space and speed. I trust all the users. Using the same GOMODCACHE for all users doesn't works, the perms are only writable by the user running the build. Is there a workaround ? Could it be a feature ?

Re: [go-nuts] New linker

2020-08-19 Thread 'Than McIntosh' via golang-nuts
To be clear, a fair amount of DWARF generation is already done in the compiler (bulk of the line table, subprogram DIEs and inline DIEs, debug ranges, etc). As far as I know, there are no near term plans (at least within the compiler+runtime team) to work on moving other bits of DWARF generation

Re: [go-nuts] How to find repeated string?

2020-08-19 Thread Bakul Shah
On Aug 19, 2020, at 1:07 AM, 洪嘉鴻 wrote: > > Hello everyone: > I use golang with Win10. The version of golang which I'm using is go1.15. > I want to find out the repeated string. > For example, given a string which is "1134534534534534". > I want the output string to be "345" > I've tried to > Co

Re: [go-nuts] New linker

2020-08-19 Thread Misha Gusarov
Hello Than, Are there plans to implement remaining pieces (I'm interested ing moving DWARF generation from linker to compiler) for 1.17, or is the project considered done for now? Best, Misha. On 18 Aug 2020, at 19:22, 'Than McIntosh' via golang-nuts wrote: To add to what Ian mentioned: Many

Re: [go-nuts] Re: best way to know executable version without running it

2020-08-19 Thread 'Axel Wagner' via golang-nuts
AIUI, the version number output by `consul version` is not specified by Go, but by the consul source itself. As far as Go is concerned, it's just be a string constant (or maybe even a dynamically assembled string from integer constants or Anything really). As such, there is no really reliable w

Re: [go-nuts] How to find repeated string?

2020-08-19 Thread Michael Jones
Maybe this way? https://play.golang.org/p/_OM4RvO83Cf On Wed, Aug 19, 2020 at 4:04 AM Ian Davis wrote: > On Wed, 19 Aug 2020, at 12:02 PM, Ian Davis wrote: > > > > On Wed, 19 Aug 2020, at 11:54 AM, Brian Candler wrote: > > Or another thought - perhaps you are looking for *adjacent* repeats only?

Re: [go-nuts] How to find repeated string?

2020-08-19 Thread Ian Davis
On Wed, 19 Aug 2020, at 12:02 PM, Ian Davis wrote: > > > On Wed, 19 Aug 2020, at 11:54 AM, Brian Candler wrote: >> Or another thought - perhaps you are looking for *adjacent* repeats only? >> >> In that case strings.Count doesn't help because it counts all occurrences, >> not just adjacent ones

Re: [go-nuts] How to find repeated string?

2020-08-19 Thread Ian Davis
On Wed, 19 Aug 2020, at 11:54 AM, Brian Candler wrote: > Or another thought - perhaps you are looking for *adjacent* repeats only? > > In that case strings.Count doesn't help because it counts all occurrences, > not just adjacent ones. I suspect the OP is looking for the longest repeating subs

Re: [go-nuts] How to find repeated string?

2020-08-19 Thread Brian Candler
Or another thought - perhaps you are looking for *adjacent* repeats only? In that case strings.Count doesn't help because it counts all occurrences, not just adjacent ones. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from thi

Re: [go-nuts] How to find repeated string?

2020-08-19 Thread Brian Candler
On Wednesday, 19 August 2020 10:41:57 UTC+1, 洪嘉鴻 wrote: > > Hello! > This is the code which I'm trying. > The generation of map is the candidates from the string s1. > However, the answer should be "345", which the count is not the most. > Your program says

Re: [go-nuts] How to find repeated string?

2020-08-19 Thread 洪嘉鴻
Hello! This is the code which I'm trying. The generation of map is the candidates from the string s1. However, the answer should be "345", which the count is not the most. Thanks for your replying. Max Jan Mercl於 2020年8月19日星期三 UTC+8下午4時31分09秒寫道: > > On Wed

Re: [go-nuts] Re: best way to know executable version without running it

2020-08-19 Thread thatipelli santhosh
Hi Guys Thank you for your response. Consul is go executable. I can get version using /bin/consul version command but I need to find the version using string search in executable file data. I noticed some pattern in executables 1.8.312345156252160h3100043191500ms781258760h94105:***@ => 1.8.3

Re: [go-nuts] How to find repeated string?

2020-08-19 Thread Jan Mercl
On Wed, Aug 19, 2020 at 10:07 AM 洪嘉鴻 wrote: > Hello everyone: > I use golang with Win10. The version of golang which I'm using is go1.15. > I want to find out the repeated string. > For example, given a string which is "1134534534534534". > I want the output string to be "345" > I've tried to > C

[go-nuts] How to find repeated string?

2020-08-19 Thread 洪嘉鴻
Hello everyone: I use golang with Win10. The version of golang which I'm using is go1.15. I want to find out the repeated string. For example, given a string which is "1134534534534534". I want the output string to be "345" I've tried to Could anyone help me to solve this problem? Any help is app