From 92be90300cc36ddc2aa7943d34d9052eea7c1bfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emek=20Vyhnal?= <1145361+premek@users.noreply.github.com> Date: Fri, 18 Nov 2022 11:54:17 +0100 Subject: [PATCH] doc: mention the $embed_file return type, and link to its documentation (#16467) --- doc/docs.md | 2 ++ vlib/v/embed_file/embed_file.v | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/docs.md b/doc/docs.md index ffa58b08c4..11642b1789 100644 --- a/doc/docs.md +++ b/doc/docs.md @@ -5320,6 +5320,8 @@ fn main() { } ``` +`$embed_file` returns [EmbedFileData](https://modules.vlang.io/v.embed_file.html#EmbedFileData) which could be used to obtain the file contents as `string` or `[]u8`. + #### `$tmpl` for embedding and parsing V template files V has a simple template language for text and html templates, and they can easily diff --git a/vlib/v/embed_file/embed_file.v b/vlib/v/embed_file/embed_file.v index 1606e0b9fc..73c49cbd79 100644 --- a/vlib/v/embed_file/embed_file.v +++ b/vlib/v/embed_file/embed_file.v @@ -6,7 +6,6 @@ pub const ( is_used = 1 ) -// https://github.com/vlang/rfcs/blob/master/embedding_resources.md // EmbedFileData encapsulates functionality for the `$embed_file()` compile time call. pub struct EmbedFileData { apath string