fix: Fix issues with nodejs and golang configuration (#146)

* fix: Give all modules a single name
* test: Add missing config tests for nodejs and golang
* test: Rename dir to directory
This commit is contained in:
Matan Kushner
2019-08-13 12:30:59 -04:00
committed by GitHub
parent 589b6cf712
commit 7424e9674c
7 changed files with 68 additions and 23 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
const GO_CHAR: &str = "🐹 ";
let module_color = Color::Cyan.bold();
let mut module = context.new_module("go")?;
let mut module = context.new_module("golang")?;
module.set_style(module_color);
let formatted_version = format_go_version(&go_version)?;
+5 -5
View File
@@ -18,12 +18,12 @@ use crate::module::Module;
pub fn handle<'a>(module: &str, context: &'a Context) -> Option<Module<'a>> {
match module {
"dir" | "directory" => directory::module(context),
"char" | "character" => character::module(context),
"node" | "nodejs" => nodejs::module(context),
"rust" | "rustlang" => rust::module(context),
"directory" => directory::module(context),
"character" => character::module(context),
"nodejs" => nodejs::module(context),
"rust" => rust::module(context),
"python" => python::module(context),
"go" | "golang" => golang::module(context),
"golang" => golang::module(context),
"line_break" => line_break::module(context),
"package" => package::module(context),
"git_branch" => git_branch::module(context),
+1 -1
View File
@@ -26,7 +26,7 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
const NODE_CHAR: &str = "";
let module_color = Color::Green.bold();
let mut module = context.new_module("node")?;
let mut module = context.new_module("nodejs")?;
module.set_style(module_color);
let formatted_version = node_version.trim();