Hi all,

Background is that I've been trying to tackle the issue here: 
https://github.com/zmap/zlint/issues/765

Effectively, there is a code signature change where I want do a large scale 
code change using AST to make old code conform to a new signature.

I have the majority of this working, and it's been successfully modifying 
the files. However, I've been struggling with getting the formatting 
looking right.

My code is on: 
https://gist.github.com/aaomidi/1530e5fa83470598aa997227feabbe0d

The output goes from:

```
func init() {
lint.RegisterLint(&lint.Lint{
Name: "e_rsa_fermat_factorization",
Description: "RSA key pairs that are too close to each other are 
susceptible to the Fermat Factorization " +
"Method (for more information please see 
https://en.wikipedia.org/wiki/Fermat%27s_factorization_method " +
"and https://fermatattack.secvuln.info/)",
Citation:      "Pierre de Fermat",
Source:        lint.Community,
EffectiveDate: util.ZeroDate,
Lint:          NewFermatFactorization,
})
}
```
to:

```
func init() {
lint.RegisterCertificateLint(&lint.CertificateLint{LintMetadata: 
lint.LintMetadata{Name: "e_rsa_fermat_factorization",
Description: "RSA key pairs that are too close to each other are 
susceptible to the Fermat Factorization " +
"Method (for more information please see 
https://en.wikipedia.org/wiki/Fermat%27s_factorization_method " +
"and https://fermatattack.secvuln.info/)",
Citation: "Pierre de Fermat",
Source: lint.Community,
EffectiveDate: util.ZeroDate}, Lint: NewFermatFactorization})

}
```
That output is not how people are used to seeing structs, how should I get 
it to be formatted correctly?

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/5d8e252f-51b9-4e09-a5f9-5d68cb90345bn%40googlegroups.com.

Reply via email to