1
1
package builtin
2
2
3
- // echo formats using the default formats for its operands and writes to standard output.
3
+ import (
4
+ "gop/builtin"
5
+ "gop/builtin/iox"
6
+ "io"
7
+ "os"
8
+ "reflect"
9
+ )
10
+
11
+ // Echo formats using the default formats for its operands and writes to standard output.
4
12
// Spaces are always added between operands and a newline is appended.
5
13
// It returns the number of bytes written and any write error encountered.
6
14
func Echo(a ...any) (n int, err error)
7
- func Blines(r io.Reader) BLineReader
15
+ func Blines(r io.Reader) iox. BLineReader
8
16
9
- // type returns the reflection [Type] that represents the dynamic type of i.
10
- // If i is a nil interface value, type returns nil.
11
- func Type(i any) Type
12
- func NewRange(start, end, step int) *IntRange
17
+ // Type returns the reflection [Type] that represents the dynamic type of i.
18
+ // If i is a nil interface value, Type returns nil.
19
+ func Type(i any) reflect. Type
20
+ func NewRange(start, end, step int) *builtin. IntRange
13
21
14
- // print formats using the default formats for its operands and writes to standard output.
22
+ // Print formats using the default formats for its operands and writes to standard output.
15
23
// Spaces are added between operands when neither is a string.
16
24
// It returns the number of bytes written and any write error encountered.
17
25
func Print(a ...any) (n int, err error)
18
26
19
- // println formats using the default formats for its operands and writes to standard output.
27
+ // Println formats using the default formats for its operands and writes to standard output.
20
28
// Spaces are always added between operands and a newline is appended.
21
29
// It returns the number of bytes written and any write error encountered.
22
30
func Println(a ...any) (n int, err error)
23
31
24
- // printf formats according to a format specifier and writes to standard output.
32
+ // Printf formats according to a format specifier and writes to standard output.
25
33
// It returns the number of bytes written and any write error encountered.
26
34
func Printf(format string, a ...any) (n int, err error)
27
35
28
- // errorf formats according to a format specifier and returns the string as a
36
+ // Errorf formats according to a format specifier and returns the string as a
29
37
// value that satisfies error.
30
38
//
31
39
// If the format specifier includes a %w verb with an error operand,
@@ -37,45 +45,45 @@ func Printf(format string, a ...any) (n int, err error)
37
45
// the error interface. The %w verb is otherwise a synonym for %v.
38
46
func Errorf(format string, a ...any) error
39
47
40
- // fprint formats using the default formats for its operands and writes to w.
48
+ // Fprint formats using the default formats for its operands and writes to w.
41
49
// Spaces are added between operands when neither is a string.
42
50
// It returns the number of bytes written and any write error encountered.
43
51
func Fprint(w io.Writer, a ...any) (n int, err error)
44
52
45
- // fprintln formats using the default formats for its operands and writes to w.
53
+ // Fprintln formats using the default formats for its operands and writes to w.
46
54
// Spaces are always added between operands and a newline is appended.
47
55
// It returns the number of bytes written and any write error encountered.
48
56
func Fprintln(w io.Writer, a ...any) (n int, err error)
49
57
50
- // fprintf formats according to a format specifier and writes to w.
58
+ // Fprintf formats according to a format specifier and writes to w.
51
59
// It returns the number of bytes written and any write error encountered.
52
60
func Fprintf(w io.Writer, format string, a ...any) (n int, err error)
53
61
54
- // sprint formats using the default formats for its operands and returns the resulting string.
62
+ // Sprint formats using the default formats for its operands and returns the resulting string.
55
63
// Spaces are added between operands when neither is a string.
56
64
func Sprint(a ...any) string
57
65
58
- // sprintln formats using the default formats for its operands and returns the resulting string.
66
+ // Sprintln formats using the default formats for its operands and returns the resulting string.
59
67
// Spaces are always added between operands and a newline is appended.
60
68
func Sprintln(a ...any) string
61
69
62
- // sprintf formats according to a format specifier and returns the resulting string.
70
+ // Sprintf formats according to a format specifier and returns the resulting string.
63
71
func Sprintf(format string, a ...any) string
64
72
65
- // open opens the named file for reading. If successful, methods on
73
+ // Open opens the named file for reading. If successful, methods on
66
74
// the returned file can be used for reading; the associated file
67
75
// descriptor has mode O_RDONLY.
68
76
// If there is an error, it will be of type *PathError.
69
- func Open(name string) (*File, error)
77
+ func Open(name string) (*os. File, error)
70
78
71
- // create creates or truncates the named file. If the file already exists,
79
+ // Create creates or truncates the named file. If the file already exists,
72
80
// it is truncated. If the file does not exist, it is created with mode 0666
73
81
// (before umask). If successful, methods on the returned File can
74
82
// be used for I/O; the associated file descriptor has mode O_RDWR.
75
83
// If there is an error, it will be of type *PathError.
76
- func Create(name string) (*File, error)
77
- func Lines(r io.Reader) LineReader
78
- func (io.Reader) Gop_Enum() LineIter
84
+ func Create(name string) (*os. File, error)
85
+ func Lines(r io.Reader) iox. LineReader
86
+ func (io.Reader) Gop_Enum() iox. LineIter
79
87
80
88
// String converts the floating-point number f to a string,
81
89
// according to the format fmt and precision prec. It rounds the
0 commit comments