Change stdlib imports to use std prefix in most examples (#17202)

This commit is contained in:
Danil Yarantsev 2021-03-01 00:17:19 +03:00 • committed by GitHub
commit 56461c280f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
45 changed files with 127 additions and 127 deletions

View file

@ -1089,7 +1089,7 @@ template onSignal*(signals: varargs[cint], body: untyped) =
## Example:
##
## .. code-block::
## from posix import SIGINT, SIGTERM, onSignal
## from std/posix import SIGINT, SIGTERM, onSignal
## onSignal(SIGINT, SIGTERM):
## echo "bye from signal ", sig

View file

@ -117,7 +117,7 @@ proc osReleaseFile*(): Config {.since: (1, 5).} =
## `os-release` file is not available on Windows and OS X by design.
## * https://www.freedesktop.org/software/systemd/man/os-release.html
runnableExamples:
import parsecfg
import std/parsecfg
when defined(linux):
let data = osReleaseFile()
echo "OS name: ", data.getSectionValue("", "NAME") ## the data is up to each distro.