Format and lint codebase for consistency and quality
- Run go fmt on all Go code (server.go formatting cleanup) - Fix shellcheck issues in build-deb.sh script: - Replace indirect exit code checks ($?) with direct command checks - Use 'if ! command' instead of 'if [ $? -ne 0 ]' - Use 'if command' instead of 'if [ $? -eq 0 ]' - All quality checks now pass: - go fmt: ✅ Code properly formatted - go vet: ✅ No issues found - shellcheck: ✅ All shell scripts validated - go test: ✅ No test failures (no tests yet) Follows project guidelines for shell script validation and code quality. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
721c1ca3a2
commit
ba052312f2
2 changed files with 6 additions and 12 deletions
|
|
@ -149,7 +149,7 @@ func (s *Server) Start() error {
|
|||
// IPv6 address needs brackets
|
||||
addr = fmt.Sprintf("[%s]:%d", s.host, s.port)
|
||||
}
|
||||
|
||||
|
||||
s.server = &http.Server{
|
||||
Addr: addr,
|
||||
Handler: router,
|
||||
|
|
|
|||
|
|
@ -45,22 +45,18 @@ LDFLAGS="-w -s -X main.version=$VERSION"
|
|||
|
||||
# Build main skyview binary
|
||||
echo_info "Building skyview..."
|
||||
go build -ldflags="$LDFLAGS" \
|
||||
if ! go build -ldflags="$LDFLAGS" \
|
||||
-o "$DEB_DIR/usr/bin/skyview" \
|
||||
./cmd/skyview
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
./cmd/skyview; then
|
||||
echo_error "Failed to build skyview"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Build beast-dump utility
|
||||
echo_info "Building beast-dump..."
|
||||
go build -ldflags="$LDFLAGS" \
|
||||
if ! go build -ldflags="$LDFLAGS" \
|
||||
-o "$DEB_DIR/usr/bin/beast-dump" \
|
||||
./cmd/beast-dump
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
./cmd/beast-dump; then
|
||||
echo_error "Failed to build beast-dump"
|
||||
exit 1
|
||||
fi
|
||||
|
|
@ -88,9 +84,7 @@ sed -i "s/Installed-Size:.*/Installed-Size: $INSTALLED_SIZE/" "$DEB_DIR/DEBIAN/c
|
|||
echo "Installed-Size: $INSTALLED_SIZE" >> "$DEB_DIR/DEBIAN/control"
|
||||
|
||||
# Build the package
|
||||
dpkg-deb --root-owner-group --build "$DEB_DIR" "$BUILD_DIR/$DEB_FILE"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
if dpkg-deb --root-owner-group --build "$DEB_DIR" "$BUILD_DIR/$DEB_FILE"; then
|
||||
echo_info "Successfully created: $BUILD_DIR/$DEB_FILE"
|
||||
|
||||
# Show package info
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue