Skip to content

Commit a662a93

Browse files
authored
Doc: various doc improvements (#2)
* doc: fix code coverage url * doc: add comparison between libraries * feat: adding category intro page * fix(doc): fix relative links * doc: update readme
1 parent c01f2f8 commit a662a93

File tree

14 files changed

+100
-20
lines changed

14 files changed

+100
-20
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![GoDoc](https://godoc.org/github.com/samber/ro?status.svg)](https://pkg.go.dev/github.com/samber/ro)
77
![Build Status](https://github.com/samber/ro/actions/workflows/test.yml/badge.svg)
88
[![Go report](https://goreportcard.com/badge/github.com/samber/ro)](https://goreportcard.com/report/github.com/samber/ro)
9-
[![Coverage](https://img.shields.io/codecov/c/github/samber/ro)](https://codecov.io/gh/samber/ro)
9+
[![Coverage](https://img.shields.io/codecov/c/github/samber/ro)](https://app.codecov.io/gh/samber/ro)
1010
[![Contributors](https://img.shields.io/github/contributors/samber/ro)](https://github.com/samber/ro/graphs/contributors)
1111

1212
> A *Go* implementation of the [ReactiveX](https://reactivex.io/) spec.
@@ -45,9 +45,9 @@ Both libraries have `Map()`, `Filter()`... helpers. How are they different?
4545
| **Size** | finite sequence | infinite stream |
4646
| **Flow control** | pull-based (iterators) | push-based |
4747

48-
`lo` is a bunch of helpers for looping across maps, slices...
48+
`lo` is a bunch of helpers for looping across finite sequences (maps, slices...)
4949

50-
`ro` is focused on data processing of event-driven applications.
50+
`ro` is focused on processing of infinite data streams in event-driven applications.
5151

5252
**Why this name?**
5353

@@ -85,6 +85,8 @@ Now you discovered the paradigm, follow the documentation and turn reactive: [
8585

8686
## Core package
8787

88+
Full documentation [here](https://ro.samber.dev/docs/operator).
89+
8890
The `ro` library provides all basic operators:
8991
- **Creation operators**: The data source, usually the first argument of `ro.Pipe`
9092
- **Chainable operators**: They filter, validate, transform, enrich... messages
@@ -102,6 +104,8 @@ The `ro` library provides all basic operators:
102104

103105
The `ro` library provides a rich ecosystem of plugins for various use cases:
104106

107+
Full documentation [here](https://ro.samber.dev/docs/plugins).
108+
105109
### Data Manipulation
106110
- **Bytes** (`plugins/bytes`) - String and byte slice manipulation operators
107111
- **Strings** (`plugins/strings`) - String manipulation operators

docs/docs/about.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,6 @@ Designed for high-throughput scenarios:
150150
- **Data processing** with transformation, aggregation and enrichment
151151
- **Event-driven** patterns
152152

153-
See [comparisons](./lo-vs-ro) with other Go libraries for more context.
153+
See [comparisons](./comparison/lo-vs-ro) with other Go libraries for more context.
154154

155155
`ro` brings the elegance and power of reactive programming to Go while maintaining the language's core strengths of simplicity and performance.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"label": "📊 Comparison",
3+
"position": 60,
4+
"link": {
5+
"type": "generated-index",
6+
"description": "Compare samber/ro with other libraries"
7+
}
8+
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: 📡 channels vs ro
2+
title: channels vs ro
33
description: Compare Go channels vs samber/ro reactive streams
44
sidebar_position: 3
55
---
@@ -594,7 +594,7 @@ The key performance difference is in backpressure handling:
594594
- **Channels**: Producer continues immediately after send, blocks only if buffer is full
595595
- **ro**: Producer waits until consumer completes processing before continuing
596596

597-
Learn more about [backpressure](./glossary#Backpressure) in the glossary.
597+
Learn more about [backpressure](../glossary#Backpressure) in the glossary.
598598

599599
:::
600600

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: 🔁 iter vs ro
2+
title: iter vs ro
33
description: Compare Go's iter package vs samber/ro reactive streams
44
sidebar_position: 4
55
---
@@ -496,8 +496,8 @@ Go's `iter` package is excellent for synchronous iteration and sequences, while
496496

497497
:::tip Learn More
498498

499-
- Explore [Observable basics](./core/observable) for reactive concepts
500-
- Learn about [backpressure](./glossary#Backpressure) in reactive systems
501-
- Compare with [Go channels](./channels-vs-ro) for another concurrency approach
499+
- Explore [Observable basics](../core/observable) for reactive concepts
500+
- Learn about [backpressure](../glossary#Backpressure) in reactive systems
501+
- Compare with [Go channels](../comparison/channels-vs-ro) for another concurrency approach
502502

503503
:::
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: ⚖️ samber/lo vs samber/ro
2+
title: samber/lo vs samber/ro
33
description: Compare samber/lo (functional utils) vs samber/ro (reactive streams)
44
sidebar_position: 5
55
---
@@ -286,8 +286,8 @@ Both libraries excel in their respective domains. Choose `lo` for traditional fu
286286

287287
:::tip Learn More
288288

289-
- Explore [samber/ro basics](./core/observable) for reactive concepts
290-
- See [Operators guide](./core/operators) for stream transformations
291-
- Learn about [backpressure](./glossary#Backpressure) in reactive systems
289+
- Explore [samber/ro basics](../core/observable) for reactive concepts
290+
- See [Operators guide](../core/operators) for stream transformations
291+
- Learn about [backpressure](../glossary#Backpressure) in reactive systems
292292

293293
:::

docs/docs/core/observer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,6 @@ This fundamental difference affects how you design concurrent systems:
473473
- **Go channels**: Producer continues immediately, consumer processes asynchronously
474474
- **Observables**: Producer waits for consumer to finish, providing synchronous semantics
475475

476-
See [Channels vs ro](../channels-vs-ro) for a detailed comparison.
476+
See [Channels vs ro](../comparison/channels-vs-ro) for a detailed comparison.
477477

478478
Observers are the essential consumer interface in reactive programming, providing a clean, thread-safe way to handle streams of values with proper error handling and lifecycle management.

docs/docs/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ Now that you understand the basics, explore:
444444

445445
- **[Operators Reference](./operator/creation.md)**: Learn about all available operators
446446
- **[Examples]**: Check out practical examples in the examples directory
447-
- **[Comparison Guides](./lo-vs-ro)**: See how `samber/ro` compares to `channel`, `iter`, and `samber/lo`
447+
- **[Comparison Guides](./comparison/lo-vs-ro)**: See how `samber/ro` compares to `channel`, `iter`, and `samber/lo`
448448
- **[Advanced Patterns](./core/subject)**: `Subjects`, backpressure, and custom operators
449449

450450
:::

docs/docs/operator/creation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Creation operators
33
description: Create observables from values, iterables, timers, channels, and events.
4-
sidebar_position: 0
4+
sidebar_position: 1
55
hide_table_of_contents: true
66
---
77

docs/docs/operator/index.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: Introduction
3+
description: Declarative and composable API
4+
sidebar_position: 0
5+
hide_table_of_contents: true
6+
---
7+
8+
The `ro` library provides all basic operators:
9+
- **Creation operators**: The data source, usually the first argument of `ro.Pipe`
10+
- **Chainable operators**: They filter, validate, transform, enrich... messages
11+
- **Transforming operators**: They transform items emitted by an `Observable`
12+
- **Filtering operators**: They selectively emit items from a source `Observable`
13+
- **Conditional operators**: Boolean operators
14+
- **Math and aggregation operators**: They perform basic math operations
15+
- **Error handling operators**: They help to recover from error notifications from an `Observable`
16+
- **Combining operators**: Combine multiple `Observable` into one
17+
- **Connectable operators**: Convert cold into hot `Observable`
18+
- **Other**: manipulation of context, utility, async scheduling...
19+
- **Plugins**: External operators (mostly IOs and library wrappers)
20+
21+
## Reference
22+
23+
import DocCardList from '@theme/DocCardList';
24+
25+
<DocCardList />

0 commit comments

Comments
 (0)