func (a *journalArgs) Copy(w io.Writer) {
	// set the deadline to the maximum across both runs
	ctx, cancel := context.WithDeadline(context.Background(), time.Now().Add(time.Duration(a.Timeout)*time.Second))
	defer cancel()
	if a.Boot != nil {
		a.copyForBoot(ctx, w, *a.Boot)
	} else {
		// show the previous boot if possible, eating errors
		a.copyForBoot(ctx, w, -1)
		// show the current boot
		a.copyForBoot(ctx, w, 0)
	}
}
// Copy streams the contents of the journalctl command executed with the current
// args to the provided writer, timing out at a.Timeout. If an error occurs a line
// is written to the output.
Copy streams the contents of the journalctl command executed with the current
args to the provided writer, timing out at a.Timeout. If an error occurs a line
is written to the output.
// Copy streams the contents of the journalctl command executed with the current // args to the provided writer timing out at a . Timeout . If an error occurs a line // is written to the output .
func (a *journalArgs) Copy(w io.Writer) {
	ctx, cancel := context.WithDeadline(context.Background(), time.Now().Add(time.Duration(a.Timeout)*time.Second))
	defer cancel()
	if a.Boot != nil {
		a.copyForBoot(ctx, w, *a.Boot)
	} else {
		a.copyForBoot(ctx, w, -1)
		a.copyForBoot(ctx, w, 0)
	}
}
func ( a * journalArgs ) Copy ( w io . Writer ) { ctx , cancel := context . WithDeadline ( context . Background ( ) , time . Now ( ) . Add ( time . Duration ( a . Timeout ) * time . Second ) ) defer cancel ( ) if a . Boot != nil { a . copyForBoot ( ctx , w , * a . Boot ) } else { a . copyForBoot ( ctx , w , - 1 ) a . copyForBoot ( ctx , w , 0 ) } }
Copy streams the contents of the journalctl command executed with the current
args to the provided writer, timing out at a.Timeout.
Copy streams the contents of the journalctl command executed with the current args to the provided writer timing out at a . Timeout .
// set the deadline to the maximum across both runs // show the previous boot if possible, eating errors // show the current boot