Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
check:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v17

- name: Enable Nix cache
uses: DeterminateSystems/magic-nix-cache-action@v8

- name: Build
run: nix develop --command cargo build

- name: Test
run: nix develop --command cargo test

- name: Clippy
run: nix develop --command cargo clippy -- -D warnings
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# njalla-cli

[![CI](https://github.com/orveth/njalla-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/orveth/njalla-cli/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Privacy-first domain management CLI for [Njalla](https://njal.la), built in Rust.

> **Disclaimer:** This is an unofficial project and is not affiliated with or endorsed by Njalla. Use at your own risk. Always verify important operations through the official Njalla web interface.
Expand Down
4 changes: 2 additions & 2 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ impl NjallaClient {
};

if self.debug {
eprintln!("[DEBUG] Request: {} {:?}", method, params);
eprintln!("[DEBUG] Request: {method} {params:?}");
}

let response = self
Expand All @@ -102,7 +102,7 @@ impl NjallaClient {
let response_text = response.text().await?;

if self.debug {
eprintln!("[DEBUG] Response: {}", response_text);
eprintln!("[DEBUG] Response: {response_text}");
}

let api_response: ApiResponse<T> = serde_json::from_str(&response_text)?;
Expand Down
2 changes: 1 addition & 1 deletion src/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ pub fn format_transactions(transactions: &[Transaction], format: OutputFormat) -

// Pad before coloring to avoid ANSI codes breaking alignment
let amount_raw = format!("€{}", t.amount);
let amount_padded = format!("{:<10}", amount_raw);
let amount_padded = format!("{amount_raw:<10}");
let amount_str = if t.completed.is_some() {
amount_padded.green().to_string()
} else {
Expand Down
Loading