domainname page ok

This commit is contained in:
gwen 2025-12-03 22:12:08 +01:00
parent 9d5ca18bdc
commit 9413831037

View file

@ -1,5 +1,5 @@
A few types suitable for our use case
================================================
Some suitable types
=====================
.. objectives:: Objectives
@ -409,10 +409,42 @@ Let's add one more variable in the `manual` family, with a much more basic type:
- we have decided to create a new structure file :file:`firefox/20-manual.yml`.
This is not necessary but usefull, please have a look at the :ref:`structure file organization and naming conventions <namingconvention>`
Let's switch this boolean variable to a `false` value:
.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/tag/v1.1_033/config/02/config.yml
:language: yaml
:caption: A :file:`config/02/config.yml` user data file with false as a value for `use_for_https`
..
---
manual:
http_proxy:
address: example.net
use_for_https: false
:tutorial:`Download this file from the rougail-tutorials git repository <src/tag/v1.1_033/config/02/config.yml>`
Let's run the rougail CLI:
.. raw:: html
:class: terminal
:url: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/tag/v1.1_033/config/02/cmd_ro.txt
..
rougail -m firefox/ -u yaml -yf config/02/config.yml
the result is:
.. raw:: html
:class: output
:url: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/tag/v1.1_033/config/02/output_ro.html
We could of course perform several tests on type validators, but here the validation is simple: only two values are allowed (`true` or `false`).
.. keypoints:: let's review the key points
- we can assign a `domainname` type to a variable
- we can set a :term:`parameter` to a `domainname` variable to refine their typing behavior
- we can assign a `port` type to a variable
- we know how to set a `boolean` type variable to `true` or `false`