Re: [go-nuts] Re: Help me troubleshoot this missing value problem

2021-06-19 Thread Tong Sun
Ah, thanks a lot Sean!

On Sat, Jun 19, 2021 at 6:52 PM Sean Liao  wrote:

> You're accessing .SecondKS when it should be .Shortcut.SecondKS (as you
> correctly do for .Shortcut.FirstKS)
>
> https://play.golang.org/p/Jzxws3JaTSQ
>
> side note: I think it's easier to read if you also use indenting in your
> templates and use `{{- -}}` to trim leading/trailing whitespace
>
> On Sunday, June 20, 2021 at 12:05:11 AM UTC+2 sunto...@gmail.com wrote:
>
>> Please take a look at
>>
>> https://play.golang.org/p/k_CM_cJgSvJ
>>
>> line 77 tries to output .FirstKS then .SecondKS if it is not nil
>>
>> However, there are two cases, the debug output shows there is .SecondKS
>> field but the template thinks there is ``:
>>
>> alt MINUS map[Id:EditorCutLineBackward
>> Shortcut:map[FirstKS:alt MINUS SecondKS:control K]] EditorCutLineBackward
>> control C map[Id:RunToCursor Shortcut:map[FirstKS:control C
>> SecondKS:control U]] RunToCursor
>>
>> I've run out of ideas how it could possibly happen.
>>
>> Somebody help please. thx
>>
>>
>> --
> 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/3NUjoj_Bakc/unsubscribe.
> To unsubscribe from this group and all its topics, 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/4c37e558-296f-4274-b7fd-679f4d50954en%40googlegroups.com
> 
> .
>

-- 
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/CAMmz1OdZfHbHcziN-GjOCbv0uXcoxAADPpEQaOT%3DCUpVpVbDHw%40mail.gmail.com.


[go-nuts] Re: Help me troubleshoot this missing value problem

2021-06-19 Thread Sean Liao
You're accessing .SecondKS when it should be .Shortcut.SecondKS (as you 
correctly do for .Shortcut.FirstKS)

https://play.golang.org/p/Jzxws3JaTSQ

side note: I think it's easier to read if you also use indenting in your 
templates and use `{{- -}}` to trim leading/trailing whitespace

On Sunday, June 20, 2021 at 12:05:11 AM UTC+2 sunto...@gmail.com wrote:

> Please take a look at
>
> https://play.golang.org/p/k_CM_cJgSvJ
>
> line 77 tries to output .FirstKS then .SecondKS if it is not nil
>
> However, there are two cases, the debug output shows there is .SecondKS 
> field but the template thinks there is ``:
>
> alt MINUS map[Id:EditorCutLineBackward Shortcut:map[FirstKS:alt 
> MINUS SecondKS:control K]] EditorCutLineBackward
> control C map[Id:RunToCursor Shortcut:map[FirstKS:control C 
> SecondKS:control U]] RunToCursor 
>  
> I've run out of ideas how it could possibly happen. 
>
> Somebody help please. thx
>
>
>

-- 
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/4c37e558-296f-4274-b7fd-679f4d50954en%40googlegroups.com.