[go-nuts] Re: go: how to input two-dimensional string array form keyboard??

2019-06-11 Thread Ivan Fraixedes
Could you post your non-working peice of code? it should help to understand 
what's the problem.

On Monday, 10 June 2019 07:19:02 UTC+2, shine sun wrote:
>
> Firstly,  I try to input N and M from keyboard, creating a two-dimensional 
> string array (var nums [N][M]string). Then, for i := 0; i < N; i++ , how to 
> use fmt.Scanf to input M strings for each nums[i]? Finally, it can 
> successfully  output the two-dimensional array nums. Thank you for helping!
>

-- 
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/b68188a4-3be1-48a3-b8d3-45678dc55c43%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] [48]byte should be make to empty

2019-06-07 Thread ivan . fraixedes
Or even just declare the var without any value assignation because it's 
zero value is an array of zero byte value, which is 0.

var array [48]byte


On Thursday, 6 June 2019 17:38:14 UTC+2, Michel Levieux wrote:
>
> Hi,
>
> It is not quite clear what you are trying to do, but if I understand it 
> well:
>
> var array = [48]byte{}
>
> should initialize your array with zero values.
>
> Le jeu. 6 juin 2019 à 15:48, sasikala tholisam  > a écrit :
>
>> test [48]byte make to empty..
>> How to do it?
>>
>> -- 
>> 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 golan...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/golang-nuts/f5a26feb-8946-415c-9eb3-f80e8da73d3c%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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/946cca47-a106-473d-bc63-03e7b7abfbba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Why not a mixture of value and pointer receiver?

2019-01-23 Thread Ivan Fraixedes
Perhaps 

There is a handy exception, though. When the value is addressable, the 
> language takes care of the common case of invoking a pointer method on a 
> value by inserting the address operator automatically. In our example, the 
> variable b is addressable, so we can call its Write method with just 
> b.Write. The compiler will rewrite that to ().Write for us.


clarifies your confusion.

You can find such paragraph 
in https://golang.org/doc/effective_go.html#pointers_vs_values 

On Wednesday, 23 January 2019 09:52:02 UTC+1, Xinhu Liu wrote:
>
> Why is that a problem? I can indeed call it on value (at line 20). I got 
> result:
>>
>> hello
>> hello
>> Program exited.
>>
>>
> I am now more confusing when I come to 
> https://golang.org/doc/faq#different_method_sets. 
>
> Am Mi., 23. Jan. 2019 um 06:47 Uhr schrieb Andrei Avram <
> andrei.a...@gmail.com >:
>
>> If it's about a method you've defined on a pointer and you want to call 
>> it on the value: https://play.golang.org/p/zMVivcaXrf3
>>
>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "golang-nuts" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/golang-nuts/xOsuXPe1IUo/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> golang-nuts...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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/d/optout.


[go-nuts] Re: [ANN] roger, an app configuration library experiment

2017-10-09 Thread Ivan Fraixedes
Thanks for this library, I also found some of those missing features that 
you listed in the README.

On Monday, 9 October 2017 00:56:32 UTC+2, Alex Buchanan wrote:
>
> My weekend project for that past couple weeks has been roger: 
> https://github.com/buchanae/roger
>
> This is another take on application configuration management: flags, env 
> vars, YAML, etc.
>
> The core ideas are:
> - define config as structs
> - defaults are defined by functions which return instances of structs
> - static code analysis and generation provides some extra metadata, 
> pulling docs from code comments on struct fields
> - able to dump YAML with docs and exclude default/empty values
>
> Other than that, it's probably just a more buggy version of existing 
> libraries (such as viper) with less features. I'll probably keep chipping 
> away at it though.
>
> It also:
> - generates flags
> - loads values from environment variables
> - loads values from a YAML file
> - coerces time.Duration and github.com/alecthomas/units and others via 
> github.com/spf13/cast
>
> More in the README
>
> Thanks!
> Alex
>

-- 
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/d/optout.