Skip to content

Commit a84a6d1

Browse files
authored
docs: fix typos, cleanup wording (#12227)
1 parent 108644d commit a84a6d1

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

doc/docs.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,7 +1312,7 @@ if mut x is MyStruct {
13121312
// same with match
13131313
match mut x {
13141314
MyStruct {
1315-
// x is casted to MyStruct even it's mutable
1315+
// x is casted to MyStruct even if it's mutable
13161316
// without the mut keyword that wouldn't work
13171317
println(x)
13181318
}
@@ -2552,8 +2552,7 @@ Installed modules:
25522552
ui
25532553
```
25542554

2555-
To see all the modules you have installed, you can use:
2556-
outdated Show installed modules that need updates.
2555+
To see all the modules that need updates:
25572556
```powershell
25582557
v outdated
25592558
```
@@ -2623,7 +2622,7 @@ Modules are up to date.
26232622
the module name you provided e.g. `mygithubname.mymodule`.
26242623

26252624
**Optional:** tag your V module with `vlang` and `vlang-module` on github.com
2626-
to allow a better search experiance.
2625+
to allow for a better search experience.
26272626

26282627
## Type Declarations
26292628

@@ -3536,7 +3535,7 @@ fn main() {
35363535
go fn (the_channel chan f64) {
35373536
_ := <-the_channel
35383537
}(ch3)
3539-
//
3538+
35403539
select {
35413540
a := <-ch {
35423541
// do something with `a`
@@ -3619,7 +3618,7 @@ using `rlock` for read-only and `lock` for read/write access.
36193618
```v
36203619
struct St {
36213620
mut:
3622-
x int // data to shared
3621+
x int // data to be shared
36233622
}
36243623
36253624
fn (shared b St) g() {
@@ -3776,7 +3775,7 @@ option to see more details about the individual tests run.
37763775

37773776
You can put additional test data, including .v source files in a folder, named
37783777
`testdata`, right next to your _test.v files. V's test framework will *ignore*
3779-
such folders, while scanning for tests to run. This is usefull, if you want to
3778+
such folders, while scanning for tests to run. This is useful, if you want to
37803779
put .v files with invalid V source code, or other tests, including known
37813780
failing ones, that should be run in a specific way/options by a parent _test.v
37823781
file.
@@ -4230,7 +4229,7 @@ Comments spanning multiple lines are merged together using spaces, unless
42304229

42314230
- the line is empty
42324231
- the line ends with a `.` (end of sentence)
4233-
- the line is contains purely of at least 3 of `-`, `=`, `_`, `*`, `~` (horizontal rule)
4232+
- the line is purely of at least 3 of `-`, `=`, `_`, `*`, `~` (horizontal rule)
42344233
- the line starts with at least one `#` followed by a space (header)
42354234
- the line starts and ends with a `|` (table)
42364235
- the line starts with `- ` (list)
@@ -4675,7 +4674,7 @@ If no flags are passed it will add `--cflags` and `--libs`, both lines below do
46754674
The `.pc` files are looked up into a hardcoded list of default pkg-config paths, the user can add
46764675
extra paths by using the `PKG_CONFIG_PATH` environment variable. Multiple modules can be passed.
46774676

4678-
To check the existance of a pkg-config use `$pkgconfig('pkg')` as a compile time if condition to
4677+
To check the existance of a pkg-config use `$pkgconfig('pkg')` as a compile time "if" condition to
46794678
check if a pkg-config exists. If it exists the branch will be created. Use `$else` or `$else $if`
46804679
to handle other cases.
46814680

@@ -4852,7 +4851,7 @@ use `v help`, `v help build` and `v help build-c`.
48524851
1. compile your binary with debugging info `v -g hello.v`
48534852
2. debug with [lldb](https://lldb.llvm.org) or [GDB](https://www.gnu.org/software/gdb/) e.g. `lldb hello`
48544853

4855-
Troubleshooting (debugging) executables [created with V in GDB](https://github.com/vlang/v/wiki/Troubleshooting-(debugging)-executables-created-with-V-in-GDB)
4854+
[Troubleshooting (debugging) executables created with V in GDB](https://github.com/vlang/v/wiki/Troubleshooting-(debugging)-executables-created-with-V-in-GDB)
48564855

48574856
**Visual debugging Setup:**
48584857
* [Visual Studio Code](vscode.md)
@@ -4864,7 +4863,7 @@ native backend (flag: `-b native`).
48644863

48654864
### Javascript Backend
48664865

4867-
To debug the generated Javascript output you can active source maps:
4866+
To debug the generated Javascript output you can activate source maps:
48684867
`v -b js -sourcemap hello.v -o hello.js`
48694868

48704869
For all supported options check the latest help:
@@ -5513,7 +5512,7 @@ fn C.my_external_function(voidptr, int, voidptr) int
55135512
// Calls to following function must be in unsafe{} blocks.
55145513
// Note that the code in the body of `risky_business()` will still be
55155514
// checked, unless you also wrap it in `unsafe {}` blocks.
5516-
// This is usefull, when you want to have an `[unsafe]` function that
5515+
// This is useful, when you want to have an `[unsafe]` function that
55175516
// has checks before/after a certain unsafe operation, that will still
55185517
// benefit from V's safety features.
55195518
[unsafe]

0 commit comments

Comments
 (0)