File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 2
2
// Use of this source code is governed by a BSD-style
3
3
// license that can be found in the LICENSE file.
4
4
5
- //go:build go1.16
6
- // +build go1.16
7
-
8
5
// Command generate creates API (settings, etc) documentation in JSON and
9
6
// Markdown for machine and human consumption.
10
7
package main
@@ -48,6 +45,10 @@ func main() {
48
45
}
49
46
50
47
func doMain (write bool ) (bool , error ) {
48
+ // TODO(adonovan): when we can rely on go1.23,
49
+ // switch to gotypesalias=1 behavior.
50
+ os .Setenv ("GODEBUG" , "gotypesalias=0" )
51
+
51
52
api , err := loadAPI ()
52
53
if err != nil {
53
54
return false , err
@@ -451,6 +452,7 @@ func typeDoc(arg *commandmeta.Field, level int) string {
451
452
case * types.Slice :
452
453
return fmt .Sprintf ("[]%s" , u .Elem ().Underlying ().String ())
453
454
}
455
+ // TODO(adonovan): use (*types.Package).Name qualifier.
454
456
return types .TypeString (under , nil )
455
457
}
456
458
You can’t perform that action at this time.
0 commit comments