Skip to content

Commit b9dbf5f

Browse files
committed
Revert fix godoc
1 parent 1881395 commit b9dbf5f

8 files changed

Lines changed: 23 additions & 6 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ package/ui/css/dialog.css
1616
# go dep
1717
package/pkg
1818
package/ui/codemirror/
19+
package/ui/test.html

build.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ usage() {
2929
echo " dev runs '_cp', 'compile' and 'package' commands"
3030
echo " clean|clear remove all *spk files"
3131
echo " lint lint code"
32+
echo " test run a simple test"
3233
echo ""
3334
}
3435

@@ -149,6 +150,7 @@ compile() {
149150
# env GOOS=linux GOARCH="$ARCH" go build -ldflags "-s -w" -o package/ui/index.cgi -- package/src/*.go
150151
echo "GOARCH=$_ARCH GOARM=$_GOARM"
151152
env CGO_ENABLED=0 GOOS=linux GOARCH="$_ARCH" GOARM="$_GOARM" go build -ldflags "-s -w" -o ../../ui/index.cgi
153+
chmod +x ../../ui/index.cgi
152154
fi
153155
cd ../../.. || edit
154156
else
@@ -224,6 +226,18 @@ lint () {
224226
revive package/src/synoedit/*.go
225227
fi
226228

229+
if command -v yarn > /dev/null; then
230+
yarn audit
231+
elif command -v npm > /dev/null; then
232+
npm audit
233+
fi
234+
}
235+
236+
test () {
237+
lint
238+
compile
239+
env SERVER_PROTOCOL=HTTP/1.1 REQUEST_METHOD=GET package/ui/index.cgi --dev > package/ui/test.html
240+
# godoc ./package/src/synoedit/
227241
}
228242

229243
CMD="${1:-""}"
@@ -251,6 +265,8 @@ elif [ "$CMD" = "clean" ] || [ "$CMD" = "clear" ]; then
251265
clean
252266
elif [ "$CMD" = "lint" ]; then
253267
lint
268+
elif [ "$CMD" = "test" ]; then
269+
test
254270
else
255271
usage
256272
fi

package/src/synoedit/auth.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License
1616
along with this program. If not, see <http://www.gnu.org/licenses/>.
1717
*/
1818

19-
package synoedit
19+
package main
2020

2121
import (
2222
"bytes"

package/src/synoedit/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License
1616
along with this program. If not, see <http://www.gnu.org/licenses/>.
1717
*/
1818

19-
package synoedit
19+
package main
2020

2121
import (
2222
"crypto/sha256"

package/src/synoedit/file_utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License
1616
along with this program. If not, see <http://www.gnu.org/licenses/>.
1717
*/
1818

19-
package synoedit
19+
package main
2020

2121
import (
2222
"io/ioutil"

package/src/synoedit/http_response.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License
1616
along with this program. If not, see <http://www.gnu.org/licenses/>.
1717
*/
1818

19-
package synoedit
19+
package main
2020

2121
import (
2222
"encoding/json"

package/src/synoedit/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
1717
*/
1818

1919
// Package synoedit is a Synology package for editing files through a web interface
20-
package synoedit
20+
package main
2121

2222
import (
2323
"flag"

package/src/synoedit/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License
1616
along with this program. If not, see <http://www.gnu.org/licenses/>.
1717
*/
1818

19-
package synoedit
19+
package main
2020

2121
import (
2222
"bytes"

0 commit comments

Comments
 (0)