Skip to content

spec: negative value for slice index #11245

Closed
@mattn

Description

@mattn

hope equivalent to python's arr[1:-1]. for example:

arr := GetItems()
fmt.Println(arr[1:len(arr)-1])

we need to take arr as variable. but i want

part_of_arr := GetItems()[1:-1]

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