Stream of consciousness rationale: To answer the above question, the relevant sentence is: The honor guard detail will, at a minimum, perform a ceremony that includes the folding and presenting of the flag of the United States to the next of kin and the playing of Taps which will be played by a lone bugler, if available, or by audio recording.
The question and answer pair are described below.
Q: As of January 1, 2000, Section 578 of Public Law 106-65 of the National Defense Authorization Act mandates that the United States Armed Forces shall provide the rendering of honors in a military funeral for any eligible veteran if requested by his or her family. As mandated by federal law, an honor guard detail for the burial of an eligible veteran shall consist of no fewer than two members of the Armed Forces. One member of the detail shall be a representative of the parent armed service of the deceased veteran. The honor guard detail will, at a minimum, perform a ceremony that includes the folding and presenting of the flag of the United States to the next of kin and the playing of Taps which will be played by a lone bugler, if available, or by audio recording. Today, there are so few buglers available that the United States Armed Forces often can not provide one. However, federal law allows Reserve and National Guard units to assist with funeral honors duty when necessary.

Answer this question based on the passage: who does flag go to at a military funeral?
A: the next of kin