summaryrefslogtreecommitdiffstats
path: root/src/configs/go.rs
diff options
context:
space:
mode:
authorThomas O'Donnell <andytom@users.noreply.github.com>2019-10-13 06:16:56 +0200
committerMatan Kushner <hello@matchai.me>2019-10-13 13:16:56 +0900
commitcc68dec795b2388c2f1d7bf5326aad4273fa474b (patch)
tree3a5992f1bb935a0603e30b6148772566e74d6f80 /src/configs/go.rs
parent8f6b0e87109639b56b5019cf0b50063f0295ff2b (diff)
refactor: Refactor Go module to the new module config (#525)
Diffstat (limited to 'src/configs/go.rs')
-rw-r--r--src/configs/go.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/configs/go.rs b/src/configs/go.rs
new file mode 100644
index 000000000..271e90217
--- /dev/null
+++ b/src/configs/go.rs
@@ -0,0 +1,23 @@
+use crate::config::{ModuleConfig, RootModuleConfig, SegmentConfig};
+
+use ansi_term::{Color, Style};
+use starship_module_config_derive::ModuleConfig;
+
+#[derive(Clone, ModuleConfig)]
+pub struct GoConfig<'a> {
+ pub symbol: SegmentConfig<'a>,
+ pub version: SegmentConfig<'a>,
+ pub style: Style,
+ pub disabled: bool,
+}
+
+impl<'a> RootModuleConfig<'a> for GoConfig<'a> {
+ fn new() -> Self {
+ GoConfig {
+ symbol: SegmentConfig::new("🐹 "),
+ version: SegmentConfig::default(),
+ style: Color::Cyan.bold(),
+ disabled: false,
+ }
+ }
+}