Skip to content

Commit

Permalink
use fieldnames [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
juliasloan25 committed Feb 23, 2024
1 parent 76efa63 commit 73bce11
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/diagnostics/diagnostic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,10 @@ function add_diagnostic_variable!(;
)
haskey(ALL_DIAGNOSTICS, short_name) && @warn(
"overwriting diagnostic `$short_name` entry containing fields\n" *
"$(ALL_DIAGNOSTICS[short_name])"
"$(map(
fieldname -> "$(getfield(ALL_DIAGNOSTICS[short_name], fieldname))",
fieldnames(DiagnosticVariable)[1:(end - 1)],
))"
# "[$(ALL_DIAGNOSTICS[short_name].short_name), " *
# "$(ALL_DIAGNOSTICS[short_name].long_name), " *
# "$(ALL_DIAGNOSTICS[short_name].standard_name), " *
Expand Down

0 comments on commit 73bce11

Please sign in to comment.