go/analysis/passes/composite: add an example to the doc

Change-Id: I929a5390aa5f4a4484e57ffa1eaa66f3238da1c1
Reviewed-on: https://go-review.googlesource.com/c/159338
Reviewed-by: Alan Donovan <adonovan@google.com>
diff --git a/go/analysis/passes/composite/composite.go b/go/analysis/passes/composite/composite.go
index 9cca778..2abe7c6 100644
--- a/go/analysis/passes/composite/composite.go
+++ b/go/analysis/passes/composite/composite.go
@@ -21,7 +21,16 @@
 This analyzer reports a diagnostic for composite literals of struct
 types imported from another package that do not use the field-keyed
 syntax. Such literals are fragile because the addition of a new field
-(even if unexported) to the struct will cause compilation to fail.`
+(even if unexported) to the struct will cause compilation to fail.
+
+As an example,
+
+	err = &net.DNSConfigError{err}
+
+should be replaced by:
+
+	err = &net.DNSConfigError{Err: err}
+`
 
 var Analyzer = &analysis.Analyzer{
 	Name:             "composites",