Standard library / io

io.SeekStart

Selects the beginning of a stream as seek origin (0). Expected stdout: '1 <nil>\n'.

Formal Syntax & Structure

go syntaxgo
const SeekStart = 0

Working Example

Example Snippetgo
package main
import (  "fmt"  "io"  "strings")
func main() { r := strings.NewReader("abc"); n, e := r.Seek(1, io.SeekStart); fmt.Println(n, e) }
Go Reference