Skip to content

cannot use (type []string) as type []interface {} in append #6804

@gopherbot

Description

@gopherbot

by itcraft.letter:

package main

func main() {
    mitem := []interface{}{}
    item := []string{"nnn", "nnn"}
    mitem = append(mitem, item...)
}

cannot use (type []string) as type []interface {} in append
http://play.golang.org/p/BCm28pzk2P

I think that this is not entirely correct, because
mitem = append(mitem, item[0]) is a good work.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions