You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "Xuanwo (via GitHub)" <gi...@apache.org> on 2023/03/23 12:33:46 UTC

[GitHub] [incubator-opendal] Xuanwo commented on a diff in pull request #1737: feat(oli): load config from both env and file

Xuanwo commented on code in PR #1737:
URL: https://github.com/apache/incubator-opendal/pull/1737#discussion_r1146117282


##########
bin/oli/src/config/mod.rs:
##########
@@ -31,6 +32,19 @@ pub struct Config {
 }
 
 impl Config {
+    /// Load profiles from both environment variables and local config file,
+    /// environment variables have higher precedence.
+    pub fn load<P: AsRef<Path>>(fp: P) -> Result<Config> {

Review Comment:
   Let's keep simple: `load(path: &str)` or `load(path: &Path)`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org