Compare commits
No commits in common. "main" and "v1.0.0" have entirely different histories.
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "gofmt",
|
"name": "gofmt",
|
||||||
"version": "1.1.2",
|
"version": "1.0.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "gofmt",
|
"name": "gofmt",
|
||||||
"version": "1.1.2",
|
"version": "1.0.0",
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "gofmt",
|
"name": "gofmt",
|
||||||
"version": "1.1.2",
|
"version": "1.0.0",
|
||||||
"author": "",
|
"author": "",
|
||||||
"main": "dist/main.js",
|
"main": "dist/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -6,11 +6,10 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func Format(source string) interface{} {
|
func Format(source string) interface{} {
|
||||||
ret, err := format.Source([]byte(source))
|
if ret, err := format.Source([]byte(source)); err == nil {
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return string(ret)
|
return string(ret)
|
||||||
|
}
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user