package main
import "go/version"
func main() {
var val int
val = version.Compare("go2.00.1", "go1.0.0")
print(val) // -1
}
--
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
Maybe it is worth checking out:
https://github.com/go-logr/logr
On Sunday, August 29, 2021 at 8:10:54 AM UTC+2 Amnon wrote:
> Yes, this is a massive pain.
>
> The standard library's log.Logger is not an interface, despite ending in
> er.
>
> If it was an interface, it would be easy for third p
package main
import (
"fmt"
"unicode"
)
func main() {
fmt.Println(MakeFirstLowerCase("LikeThis"))
}
func MakeFirstLowerCase(s string) string {
if len(s)==0 {
return s
}
r := []rune(s)
r[0] = unicode.ToLower(r[0])
return string(r)
}
On Thu, Jun 18, 2020 at 10:38 AM
le to goroutines running on other processors.
I would like to better understand how this works. What is it that makes this
‘flush out’ to happen? Is this a system call?
—
Leo
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe
versions of Go
Language Specification and Standard Library documentation?
Thanks,
--Leo
--
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-nut
> need the lock on the readers)
>
> On Sep 4, 2019, at 4:55 AM, Leo Lara wrote:
>
>
>
> You should read up on how a RWLock works.
>>
>
> I am not going to answer to that ;-)
>
> About this code:
>
> https://play.golang.org/p/YOwuYFiqtlf
>
> 1. I wouldn&
wikipedia.org/wiki/White_box_(software_engineering)> or open
system <https://en.wikipedia.org/wiki/Open_system_(computing)>)""""
On Saturday, August 31, 2019 at 10:53:26 AM UTC+2, Jesper Louis Andersen
wrote:
>
> On Thu, Aug 29, 2019 at 7:02 AM Leo Lara
fact, others can be late started, as
>>>>>>> they
>>>>>>> will fail fast if the channel is already closed.
>>>>>>>
>>>>>>
>>>>>> https://play.golang.org/p/pcwIu2w8ZRb
>>>>>>
>>&g
efore the desired number of iterations.
>
> On Aug 29, 2019, at 12:13 AM, Leo Lara > wrote:
>
> Hi Robert,
>
> To put you in context, it all started when I read
> https://go101.org/article/channel-closing.html , that said that it is
> impossible or at least you shouldn
haring a channel and closing it
> safely upon receiving an exit flag:
> https://play.golang.org/p/RiKi1PGVSvF
>
> -- Marcin
>
> On Wed, Aug 28, 2019 at 11:29 AM Leo Lara > wrote:
>
>> I do not think priority select is *necessary*, it could be a nice
>> addition i
model for this, you want a thread safe flag of some sort. For example:
>>
>> var exitFlag uint64
>> func producer(chan data int, wg *sync.WaitGroup) {
>> defer wg.Done()
>> for {
>> shouldExit := atomic.LoadUint64(&exitFlag)
>> if shouldExit =
r(chan data int, wg *sync.WaitGroup) {
>> defer wg.Done()
>> for {
>> shouldExit := atomic.LoadUint64(&exitFlag)
>> if shouldExit == 1 {
>> return
>> }
>> chan <- rand.Intn(100)
>> }
>>
I do not think priority select is *necessary*, it could be a nice addition
if the performance does not change.
On Wednesday, August 28, 2019 at 8:27:36 PM UTC+2, Leo Lara wrote:
>
> Hi Robert,
>
> From the article: """To bound more the problem, in my case, you control
ncapsulate it all in a MultiWriterChannel struct - generics would
> help here :)
>
> -Original Message-
> From: Leo Lara
> Sent: Aug 28, 2019 11:24 AM
> To: golang-nuts
> Subject: [go-nuts] Re: An old problem: lack of priority select cases
>
> This is connected
This is connected with my article:
https://dev.to/leolara/closing-a-go-channel-written-by-several-goroutines-52j2
I think there I show it is possible to workaround that limitation using
standard Go tools. Of course, the code would be simple with priority
select, but also perhaps select would be
Dan is the only one in this thread who pays attention to the actual value
of the timestamp not just to its format :-)
--Leo
On Tuesday, July 23, 2019 at 7:45:37 PM UTC-4, Robert Engels wrote:
>
> Funny. Did you remember it or just pay close attention to these things?
>
> > On J
iliarity with programming in general.
Hope it helps,
--Leo
On Friday, July 19, 2019 at 9:39:03 AM UTC-4, veeres...@gmail.com wrote:
>
> would anyone help me out how to learn go lang more practically , may be
> some resources . I want to understand go lang more practically , with some
> g
a sad possibility.
gonum is a very interesting project which plays in the same space as
numpy. But is there anything that can replace pandas in the Go-universe?
--Leo
On Tuesday, July 16, 2019 at 6:29:50 PM UTC-4, kortschak wrote:
>
> We'd (gonum-dev) likely advise not to use julia
zoo. Language barriers in scientifically heavy fields
are not healthy. In Statistics, Python's stats.models is a pale shadow of
R's CRAN. Science community is split along the language lines that spreads
already thin resources even further.
--Leo
On Tuesday, July 16, 2019 at 4:45:3
ng or will leave the
field to other players.
--Leo
On Tuesday, July 16, 2019 at 3:31:12 PM UTC-4, Michael Jones wrote:
>
> Leo,
>
> R is implemented in C and FORTRAN plus R on top of that. SAS is in C (and
> some Go here and there) plus the SAS language in top of that. Mathematica
Me too I have to add struct tags to over 300 objects, repeating the same
text in a different style, totally unproductive and annoying work which the
computer should do for me.
In the end I've used a tool that parses the .go files and adds the tags
automatically, although that resulted in dozens
21 matches
Mail list logo