On Fri, Nov 19, 2021 at 7:17 AM Van Fury <furyva...@gmail.com> wrote:

> I have a map as shown below
>
> var CtxStarStore = make(map[string]AuthCtx)
>
> map[ccc-999401002:{989c48c5-7f9c-4058-80a2-b769ea4675f9 imei-1234010002}
> bbb-999401003:{989c48c5-7f9c-4058-80a2-b769ea4675f9 imei-1234010003}]
>

This isn't legal Go.


> I would like to delete ccc-999401002  or any key value from the map I
> tried delete as
> s := "ccc-999401002"
>
> delete(CtxStarStore, s)
>

That should work once you correct the initialization of the map.


> Any reason why I cannot delete it
>
> No idea since you didn't provide us with an example of code that compiles.
It's usually a good idea to enter your example at https://play.golang.com
to verify it at least compiles then include a link to that code in your
message.

 --
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank

-- 
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/CABx2%3DD-TM5j5g0uHmX_emLaHrGJdM4NHmAy1weS0t7THo6dFMw%40mail.gmail.com.

Reply via email to