a good idea if the values come from function calls since there would
sometimes be needless function calls.
var color = “blue”
if temperature > 100 {
color = “red”
}
---
R. Mark Volkmann
Object Computing, Inc.
--
You received this message because you are subscribed to the Google Groups
&qu
it on real projects. Getting more developers to consider
Go makes that more likely.
---
R. Mark Volkmann
Object Computing, Inc.
> On Aug 14, 2018, at 12:18 PM, Axel Wagner
> wrote:
>
> There is lots of discussion findable here:
> https://groups.google.com/forum/#!searchi
I see that I can use the `reflect` package to get the key type of a map
like this:
```go
mt := reflect.TypeOf(myMap)
fmt.Println("key type is", mt.Key())
```
But I don't see a way to get the value type of a map. Is there a method to
do this?
--
R. Mark Volkmann
Object Computing
How did you do that? I don’t see any formatting configuration.
---
R. Mark Volkmann
Object Computing, Inc.
> On Sep 8, 2018, at 3:48 AM, Jan Mercl <0xj...@gmail.com> wrote:
>
> On Sat, Sep 8, 2018 at 10:14 AM Dave Cheney wrote:
>
> > I personally don't like
main.go" in the directory of the demo code I get
build demo: cannot find module for path foo/bar
Is there something wrong with my use of the "replace" directive?
None of this code is under the directory pointed to by GOPATH because I'm
trying to use Go modules for everything
> On Oct 19, 2018, at 4:48 PM, Justin Israel wrote:
>
>
>
>> On Sat, Oct 20, 2018, 9:42 AM Mark Volkmann
>> wrote:
>> I have a simple demo application that wants to use a package that is on my
>> local file system.
>> The code for the package is
bar
> $ cat go.mod
> module example.com/foo
>
> require example.com/bar v0.0.0
>
> replace example.com/bar => /root/bar
> $ go run .
> Hello from bar!
> On Fri, 19 Oct 2018 at 21:42, Mark Volkmann
> wrote:
> >
> > I have a simple demo application that want
I see though that "go mode edit" really wants there to be a dot in the
first part of the import path.
Where can I read about that requirement?
On Fri, Oct 19, 2018 at 6:30 PM Mark Volkmann
wrote:
> Thank you so much! I actually got it to work without having a dot in the
> f
Wow, this is a wonderful library! Thanks so much for creating this!
---
R. Mark Volkmann
Object Computing, Inc.
> On Nov 11, 2018, at 1:27 PM, Iván Corrales Solera
> wrote:
>
> Hey guys, last weeks I've been working on Koazee and I just released a very
> first
ved 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.
>> For more options, visit https://groups.google.
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.
> For more options, visit https://groups.google.com/d/optout.
>
--
R. Mark Volkma
this?
myValue := *myPtr
for _, v := range values {
fmt.Printf("%v %v\n", myValue, v)
}
--
R. Mark Volkmann
Object Computing, Inc.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop rece
each loop iteration?
On Fri, Nov 30, 2018 at 11:36 AM Jan Mercl <0xj...@gmail.com> wrote:
>
> On Fri, Nov 30, 2018 at 6:16 PM Mark Volkmann
> wrote:
>
> > Will the Go compiler optimize the pointer dereference so it doesn't
> happen in every loop iteration? If
this: myThingType :=
reflect.TypeOf(new(MyThing)).Elem()
I seems odd that I have to create one with new, getting a pointer to it,
and then ask for the type of the thing in points to (with Elem) in order to
get what I need.
--
R. Mark Volkmann
Object Computing, Inc.
--
You received this message
Is it possible to pass an interface to a function in Go? I don’t want to
pass a value whose type implements the interface, I want to pass the
interface.
--
R. Mark Volkmann
Object Computing, Inc.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts&q
>
>
>
>
> понедельник, 10 декабря 2018 г., 5:05:12 UTC+3 пользователь Robert Engels
> написал:
>>
>> I mean reflect.Type not a type that is an interface.
>>
>> On Dec 9, 2018, at 6:53 PM, Space A. wrote:
>>
>> Of course. When you "pass a
> }
> > >
> > > fmt.Println("reflect.Type is", reflect.TypeOf(&i).Elem())
> > > }
> > >
> > > Output:
> > >
> > > is interface, with value: test
> > > reflect.Type is interface {}
>
Thanks so much Dan!
---
R. Mark Volkmann
Object Computing, Inc.
> On Dec 10, 2018, at 8:34 PM, Dan Kortschak wrote:
>
> https://play.golang.org/p/VWPb_AcgUrl
>
>> On Mon, 2018-12-10 at 20:14 -0600, Mark Volkmann wrote:
>> Here is some code that shows a part of what I&
ld be expressions rather
>> than statements. How would that negatively impact the language, in a way
>> that can't already be reproduced?
>>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsu
the index excludes the Kind method in the list of Type
methods?
--
R. Mark Volkmann
Object Computing, Inc.
--
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 e
n, Dec 24, 2018 at 12:04 PM Ian Lance Taylor wrote:
> On Mon, Dec 24, 2018 at 9:29 AM Mark Volkmann
> wrote:
> >
> > IIUC, Kind is a method of both Type and Value. But the index near the
> top of https://golang.org/pkg/reflect/ only shows it as a method of
> Value. If yo
Maybe it would be good to add an indication of just the basic type of each type
in the index. For example, is the type a struct, interface, or something else?
---
R. Mark Volkmann
Object Computing, Inc.
> On Dec 24, 2018, at 12:35 PM, Ian Lance Taylor wrote:
>
> On Mon, Dec 24, 2018
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.
> For more options, visit https://groups.google.com/
> On Apr 24, 2019, at 6:22 AM, Robert Engels wrote:
>
> Though to the ops point, not sure why Go doesn’t have the ternary operator -
> which is pretty ubiquitous.
The idea of adding the ternary operator to Go has been debated many times. It’s
clear that those in charge have a strong dislike
ted ternaries.
R. Mark Volkmann
Object Computing, Inc.
> On Apr 24, 2019, at 8:58 AM, Jan Mercl <0xj...@gmail.com> wrote:
>
>> On Wed, Apr 24, 2019 at 3:48 PM L Godioleskky wrote:
>>
>> The lack of a Go ternary operator is at odds with Go's major theme of clean
t; >
>>> > Ian
>>>
>>> --
>> 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+uns
f4a455e71b5f9fff79310/src/lib/libz/deflate.c#L597-L609
>
> For those who don't want to follow those links this is the code from the
> first URL above:
>
> lc_unicodeliterals = quote=='u' ? 1 : quote=='U' ? 0 : !!(ast.locale.set &
> AST_LC_unicodeliterals
ly be confused by operators related
to channels.
If you allow people to use pointers, will they use pointers to pointers to
pointers to pointers?
On Thu, Apr 25, 2019 at 9:19 AM Sam Whited wrote:
> On Wed, Apr 24, 2019, at 14:08, Mark Volkmann wrote:
> > Are there really developers that
28 matches
Mail list logo