forked from mirror/go-json
commit
897345da64
|
@ -3,6 +3,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"go/format"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
@ -380,7 +381,11 @@ func (t opType) fieldToStringTagField() opType {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
path := filepath.Join(repoRoot(), "encode_optype.go")
|
path := filepath.Join(repoRoot(), "encode_optype.go")
|
||||||
return ioutil.WriteFile(path, b.Bytes(), 0644)
|
buf, err := format.Source(b.Bytes())
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return ioutil.WriteFile(path, buf, 0644)
|
||||||
}
|
}
|
||||||
|
|
||||||
func repoRoot() string {
|
func repoRoot() string {
|
||||||
|
|
15979
encode_optype.go
15979
encode_optype.go
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue