Skip to content

Commit 993efe6

Browse files
author
Ciro S. Costa
committed
Improves cast comments
1 parent 7d56ecd commit 993efe6

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

cast/cast.go

+17-1
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,29 @@ type Header struct {
7070
} `json:"env,omitempty"`
7171
}
7272

73+
// Event represents terminal inputs that get recorded by asciinema.
7374
type Event struct {
75+
// Time indicates when this event happened, represented as the number
76+
// of seconds since the beginning of the recording session.
7477
Time float64
78+
79+
// Type represents the type of the data that's been recorded.
80+
//
81+
// Two types are possible:
82+
// - "o": data written to stdout; and
83+
// - "i": data read from stdin.
7584
Type string
85+
86+
// Data represents the data recorded from the terminal.
7687
Data string
7788
}
7889

90+
// Cast represents the whole asciinema session.
7991
type Cast struct {
80-
Header Header
92+
// Header presents the recording metadata.
93+
Header Header
94+
95+
// EventStream contains all the events that were generated during
96+
// the recording.
8197
EventStream []*Event
8298
}

0 commit comments

Comments
 (0)