comment on exported method ExitEpochAndUpdateChurn should be of the form "ExitEpochAndUpdateChurn ..."
126 return hasETH1WithdrawalCredential(val) && hasExcessBalance && hasMaxBalance
127}
128
129// TODO: This goes in exits file?130// ExitEpochAndUpdateChurn
131//
132// Spec definition:
comment on exported method PendingPartialWithdrawals should be of the form "PendingPartialWithdrawals ..."
438 return sum, nil
439}
440
441// TODO: consider if this way of implementing getter is correct442func (b *BeaconState) PendingPartialWithdrawals() ([]*ethpb.PartialWithdrawal, error) {
443 if b.version < version.Electra {
444 return nil, errNotSupported("PendingPartialWithdrawals", b.version)
Description
Doc comments work best as complete sentences, which allow a wide variety of automated presentations. The first sentence should be a one-sentence summary that starts with the name being declared.
If every doc comment begins with the name of the item it describes, you can use the doc subcommand of the go tool and run the output through grep.
See https://golang.org/doc/effective_go.html#commentary for more information on how to write good documentation.
Bad practice
package main
// This function tries to summon a cybernetically enhanced duck
func SummonDucks() {
}
Recommended
package main
// SummonDucks tries to summon a cybernetically enhanced duck
func SummonDucks() {
}