godlint-cli 0.2.0

Command-line interface for Godlint.
1
2
3
4
5
6
7
8
9
10
11
//! A file that satisfies every configured rule.

/// Sums the values that pass `keep`.
fn total(values: &[u32]) -> u32 {
    values.iter().copied().filter(|value| keep(*value)).sum()
}

/// Reports whether a value contributes to the total.
fn keep(value: u32) -> bool {
    value > 0
}