From 5a7871f6474fd29997e8e8eac97b1053df3f3061 Mon Sep 17 00:00:00 2001 From: Turiiya <34311583+ttytm@users.noreply.github.com> Date: Sun, 7 Apr 2024 15:31:14 +0200 Subject: [PATCH] chore: use relative import paths, as it is now supported --- curl/instructions/common.v | 2 +- curl/instructions/easy.v | 2 +- curl/lib.v | 4 ++-- src/_instruction_download.v | 2 +- src/_instructions_common.v | 2 +- src/_instructions_get.v | 2 +- src/_instructions_head.v | 2 +- src/_instructions_header.v | 2 +- src/_instructions_post.v | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/curl/instructions/common.v b/curl/instructions/common.v index 0783194..3977c46 100644 --- a/curl/instructions/common.v +++ b/curl/instructions/common.v @@ -1,6 +1,6 @@ module instructions -import vibe.curl.state +import state fn C.curl_global_init(state.GlobalInitFlag) diff --git a/curl/instructions/easy.v b/curl/instructions/easy.v index aa291d9..f72e653 100644 --- a/curl/instructions/easy.v +++ b/curl/instructions/easy.v @@ -1,6 +1,6 @@ module instructions -import vibe.curl.state +import state fn C.curl_easy_init() &C.CURL fn C.curl_easy_cleanup(&C.CURL) diff --git a/curl/lib.v b/curl/lib.v index 7ad957d..49b9d65 100644 --- a/curl/lib.v +++ b/curl/lib.v @@ -5,8 +5,8 @@ License: MIT module curl -import vibe.curl.instructions -import vibe.curl.state +import instructions +import state #flag -lcurl #include diff --git a/src/_instruction_download.v b/src/_instruction_download.v index 2dda5ba..2a5d735 100644 --- a/src/_instruction_download.v +++ b/src/_instruction_download.v @@ -1,7 +1,7 @@ module vibe import os -import vibe.curl +import curl fn (req Request) download_file_(url string, file_path string) !Response { h := curl.easy_init() or { return http_error(.easy_init, none) } diff --git a/src/_instructions_common.v b/src/_instructions_common.v index d37881c..7c2e733 100644 --- a/src/_instructions_common.v +++ b/src/_instructions_common.v @@ -1,6 +1,6 @@ module vibe -import vibe.curl +import curl // Automatically call curl_global_init when using `vibe`. fn init() { diff --git a/src/_instructions_get.v b/src/_instructions_get.v index d4c9750..c1a1c09 100644 --- a/src/_instructions_get.v +++ b/src/_instructions_get.v @@ -1,6 +1,6 @@ module vibe -import vibe.curl +import curl fn (req Request) get_(url string) !Response { // Curl handle diff --git a/src/_instructions_head.v b/src/_instructions_head.v index 5f1851d..b5d0845 100644 --- a/src/_instructions_head.v +++ b/src/_instructions_head.v @@ -1,6 +1,6 @@ module vibe -import vibe.curl +import curl fn (req Request) head_(url string) !Response { h := curl.easy_init() or { return http_error(.easy_init, none) } diff --git a/src/_instructions_header.v b/src/_instructions_header.v index f9ec1a2..e6e4881 100644 --- a/src/_instructions_header.v +++ b/src/_instructions_header.v @@ -1,6 +1,6 @@ module vibe -import vibe.curl +import curl fn set_header(handle &curl.Handle, headers HttpHeaders) &curl.LinkedList { mut list := &curl.LinkedList(unsafe { nil }) diff --git a/src/_instructions_post.v b/src/_instructions_post.v index 46229ae..b62778f 100644 --- a/src/_instructions_post.v +++ b/src/_instructions_post.v @@ -1,6 +1,6 @@ module vibe -import vibe.curl +import curl fn (req Request) post_(url string, data string) !Response { h := curl.easy_init() or { return http_error(.easy_init, none) }