@@ -49,7 +49,7 @@ func NewIngestCmd(f *cmdutil.Factory) *cobra.Command {
49
49
}
50
50
51
51
cmd := & cobra.Command {
52
- Use : "ingest <dataset-name> [(-f|--file) <filename> [ ...]] [--timestamp-field <timestamp-field>] [--timestamp-format <timestamp-format>] [--flush-every <duration>] [(-c|--compression=)TRUE|FALSE] " ,
52
+ Use : "ingest <dataset-name> [(-f|--file) <filename> [ ...]] [--timestamp-field <timestamp-field>] [--timestamp-format <timestamp-format>] [--flush-every <duration>]" ,
53
53
Short : "Ingest data" ,
54
54
Long : heredoc .Doc (`
55
55
Ingest data into an Axiom dataset.
@@ -83,10 +83,6 @@ func NewIngestCmd(f *cmdutil.Factory) *cobra.Command {
83
83
# "nginx-logs":
84
84
$ axiom ingest nginx-logs -f nginx-logs.json
85
85
86
- # Ingest the contents of all files inside /var/logs/nginx with
87
- # extension ".log" into a dataset named "nginx-logs":
88
- $ axiom ingest nginx-logs -f /var/logs/nginx/*.log
89
-
90
86
# Pipe the contents of a log generator into a dataset named
91
87
# "gen-logs". If the length of the data stream is unknown, the
92
88
# "--flush-every" flag can be tweaked to optimize shipping the data
@@ -146,7 +142,7 @@ func complete(ctx context.Context, opts *options) error {
146
142
147
143
// Just fetch a list of available datasets if a Personal Access Token is
148
144
// used.
149
- datasetNames := make ( []string , 0 )
145
+ var datasetNames []string
150
146
if dep , ok := opts .Config .GetActiveDeployment (); ok && client .IsPersonalToken (dep .Token ) {
151
147
client , err := opts .Client ()
152
148
if err != nil {
@@ -163,6 +159,7 @@ func complete(ctx context.Context, opts *options) error {
163
159
164
160
stop ()
165
161
162
+ datasetNames = make ([]string , len (datasets ))
166
163
for i , dataset := range datasets {
167
164
datasetNames [i ] = dataset .Name
168
165
}
0 commit comments