A Range Type is a type that produces a new tuple or array type that derives from T
by dropping the excess ordered
elements of T
outside of the range starting at offset X
(inclusive) through offset Y
(exclusive).
A Range Type is denoted using a :
operator in what would otherwise be an Indexed Access Type:
type T = [1, 2, 3][0:2];
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"context" | |
"fmt" | |
"log" | |
"net" | |
"net/http" | |
"os" |