* sasikala tholisam <gr.sasikala...@gmail.com> [190606 09:49]:
> 
> test []Exam
> 
> type Exam struct{
>     Time uint32
>     LogType uint32
>     Data [32]byte
> }
> 
> test is a slice of []Exam..It should be an empty slice...how to make test 
> as empty?

After changing the first line to

var test []Exam

your code will produce an empty slice for test.  You can check its
length with len(test) and it will be 0.  Here's the code on the
playground:  https://play.golang.org/p/UtZ-YhNXojk

...Marvin

-- 
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/20190606145528.ufocsb6tfi5i6pah%40basil.wdw.
For more options, visit https://groups.google.com/d/optout.

Reply via email to