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
|
// IPv6 address needs brackets
|
||||||
addr = fmt.Sprintf("[%s]:%d", s.host, s.port)
|
addr = fmt.Sprintf("[%s]:%d", s.host, s.port)
|
||||||
}
|
}
|
||||||
|
|
||||||
s.server = &http.Server{
|
s.server = &http.Server{
|
||||||
Addr: addr,
|
Addr: addr,
|
||||||
Handler: router,
|
Handler: router,
|
||||||
|
|
|
||||||
|
|
@ -45,22 +45,18 @@ LDFLAGS="-w -s -X main.version=$VERSION"
|
||||||
|
|
||||||
# Build main skyview binary
|
# Build main skyview binary
|
||||||
echo_info "Building skyview..."
|
echo_info "Building skyview..."
|
||||||
go build -ldflags="$LDFLAGS" \
|
if ! go build -ldflags="$LDFLAGS" \
|
||||||
-o "$DEB_DIR/usr/bin/skyview" \
|
-o "$DEB_DIR/usr/bin/skyview" \
|
||||||
./cmd/skyview
|
./cmd/skyview; then
|
||||||
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo_error "Failed to build skyview"
|
echo_error "Failed to build skyview"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Build beast-dump utility
|
# Build beast-dump utility
|
||||||
echo_info "Building beast-dump..."
|
echo_info "Building beast-dump..."
|
||||||
go build -ldflags="$LDFLAGS" \
|
if ! go build -ldflags="$LDFLAGS" \
|
||||||
-o "$DEB_DIR/usr/bin/beast-dump" \
|
-o "$DEB_DIR/usr/bin/beast-dump" \
|
||||||
./cmd/beast-dump
|
./cmd/beast-dump; then
|
||||||
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo_error "Failed to build beast-dump"
|
echo_error "Failed to build beast-dump"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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"
|
echo "Installed-Size: $INSTALLED_SIZE" >> "$DEB_DIR/DEBIAN/control"
|
||||||
|
|
||||||
# Build the package
|
# Build the package
|
||||||
dpkg-deb --root-owner-group --build "$DEB_DIR" "$BUILD_DIR/$DEB_FILE"
|
if dpkg-deb --root-owner-group --build "$DEB_DIR" "$BUILD_DIR/$DEB_FILE"; then
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
echo_info "Successfully created: $BUILD_DIR/$DEB_FILE"
|
echo_info "Successfully created: $BUILD_DIR/$DEB_FILE"
|
||||||
|
|
||||||
# Show package info
|
# Show package info
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue