1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

tools: improve v check-md by checking for broken TOC headline links (#10417)

This commit is contained in:
Andreas Heissenberger
2021-06-14 12:12:02 +02:00
committed by GitHub
parent 90d04b0ce6
commit 7983495c57
5 changed files with 165 additions and 38 deletions

View File

@@ -83,7 +83,7 @@ For more details and troubleshooting, please visit the [vab GitHub repository](h
* [Structs](#structs)
* [Embedded structs](#embedded-structs)
* [Default field values](#default-field-values)
* [Short struct literal syntax](#short-struct-initialization-syntax)
* [Short struct literal syntax](#short-struct-literal-syntax)
* [Access modifiers](#access-modifiers)
* [Methods](#methods)
* [Unions](#unions)
@@ -2270,7 +2270,7 @@ You can also install modules already created by someone else with [VPM](https://
```powershell
v install [module]
```
###### Example:
**Example:**
```powershell
v install ui
```
@@ -2280,7 +2280,7 @@ Removing a module with v:
```powershell
v remove [module]
```
###### Example:
**Example:**
```powershell
v remove ui
```
@@ -2290,7 +2290,7 @@ Updating an installed module from [VPM](https://vpm.vlang.io/):
```powershell
v update [module]
```
###### Example:
**Example:**
```powershell
v update ui
```
@@ -2305,7 +2305,7 @@ To see all the modules you have installed, you can use:
```powershell
v list
```
###### Example
**Example:**
```powershell
> v list
Installed modules:
@@ -2318,7 +2318,7 @@ outdated Show installed modules that need updates.
```powershell
v outdated
```
###### Example
**Example:**
```powershell
> v outdated
Modules are up to date.
@@ -4024,7 +4024,7 @@ created by the JS Backend (flag: `-b js`).
`$` is used as a prefix for compile-time operations.
#### $if
#### `$if` condition
```v
// Support for multiple conditions in one branch
$if ios || android {
@@ -4076,7 +4076,7 @@ Full list of builtin options:
| `gnu`, `hpux`, `haiku`, `qnx` | `cplusplus` | `big_endian` |
| `solaris` | | | |
#### $embed_file
#### `$embed_file`
```v ignore
import os
@@ -4099,7 +4099,7 @@ executable, increasing your binary size, but making it more self contained
and thus easier to distribute. In this case, `f.data()` will cause *no IO*,
and it will always return the same data.
#### $tmpl for embedding and parsing V template files
#### `$tmpl` for embedding and parsing V template files
V has a simple template language for text and html templates, and they can easily
be embedded via `$tmpl('path/to/template.txt')`:
@@ -4149,7 +4149,7 @@ numbers: [1, 2, 3]
#### $env
#### `$env`
```v
module main

View File

@@ -74,37 +74,37 @@ different capabilities:
| structured data types | + | + | + | |
### Strengths
#### default
**default**
- very fast
- unlimited access from different coroutines
- easy to handle
#### `mut`
**`mut`**
- very fast
- easy to handle
#### `shared`
**`shared`**
- concurrent access from different coroutines
- data type may be complex structure
- sophisticated access possible (several statements within one `lock`
block)
#### `atomic`
**`atomic`**
- concurrent access from different coroutines
- reasonably fast
### Weaknesses
#### default
**default**
- read only
#### `mut`
**`mut`**
- access only from one coroutine at a time
#### `shared`
**`shared`**
- lock/unlock are slow
- moderately difficult to handle (needs `lock` block)
#### `atomic`
**`atomic`**
- limited to single (max. 64 bit) integers (and pointers)
- only a small set of predefined operations possible
- very difficult to handle correctly
@@ -191,3 +191,5 @@ are sometimes surprising. Each statement should be seen as a single
transaction that is unrelated to the previous or following
statement. Therefore - but also for performance reasons - it's often
better to group consecutive coherent statements in an explicit `lock` block.
### Channels

View File

@@ -23,7 +23,7 @@ provides V language support for Visual Studio Code.
[install V compiler](https://github.com/vlang/v/blob/master/doc/docs.md#install-from-source)
on your operating system.
### Setup
### Setup Extention
Install [V VS Code Extention](https://marketplace.visualstudio.com/items?itemName=vlanguage.vscode-vlang).
@@ -45,7 +45,7 @@ for Visual Studio Code provides visual conditional debugging.
[DWARF](https://en.wikipedia.org/wiki/DWARF) information to show and
edit the variable.
### Setup
### Setup Debugging
1. Install the [C/C++ Extention](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools)
2. Open `RUN AND DEBUG` panel (Debug Icon in left panel).