1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-06-10 12:22:21 +00:00
starship/src/configs/go.rs

45 lines
1.2 KiB
Rust
Raw Normal View History

use serde::{Deserialize, Serialize};
#[derive(Clone, Deserialize, Serialize)]
#[cfg_attr(
feature = "config-schema",
derive(schemars::JsonSchema),
schemars(deny_unknown_fields)
)]
#[serde(default)]
pub struct GoConfig<'a> {
pub format: &'a str,
feat: Add version formating for modules (#2611) * format crystal version with VersionFormatter * update crystal dosc * format crystal module * fix typos * format dart version with VersionFormatter * fix dart malformed test * update dart docs * format cmake version with VersionFormatter * update cmake docs * format deno version with VersionFormatter * update deno docs * remove Version type * format dotnet version with VersionFormatter * update dotnet docs * format erlang version with VersionFormatter * update erlang docs * format golang version with VersionFormatter * refactor formatting in my modules * format helm version with VersionFormatter * format julia version with VersionFormatter * format kotlin version with VersionFormatter * format lua version with VersionFormatter * format nim version with VersionFormatter * format perl version with VersionFormatter * format php version with VersionFormatter * format purescript version with VersionFormatter * format scala version with VersionFormatter * format swift version with VersionFormatter * format terraform version with VersionFormatter * format vagrant version with VersionFormatter * format zig version with VersionFormatter * format elixir version with VersionFormatter * format ocaml version with VersionFormatter * update elixir docs * update golang docs * update helm docs * update julia docs * update kotlin docs * update lua docs * update nim docs * update ocaml docs * update perl docs * update php docs * update purescript docs * update scala docs * update swift docs * update terraform docs * update vagrant docs * update zig docs * format elm version with VersionFormatter * update elm docs * pass module_name as &str to format_module_version
2021-04-29 21:22:20 +00:00
pub version_format: &'a str,
pub symbol: &'a str,
pub style: &'a str,
pub disabled: bool,
pub not_capable_style: &'a str,
pub detect_extensions: Vec<&'a str>,
pub detect_files: Vec<&'a str>,
pub detect_folders: Vec<&'a str>,
}
impl<'a> Default for GoConfig<'a> {
fn default() -> Self {
GoConfig {
format: "via [$symbol($version )]($style)",
feat: Add version formating for modules (#2611) * format crystal version with VersionFormatter * update crystal dosc * format crystal module * fix typos * format dart version with VersionFormatter * fix dart malformed test * update dart docs * format cmake version with VersionFormatter * update cmake docs * format deno version with VersionFormatter * update deno docs * remove Version type * format dotnet version with VersionFormatter * update dotnet docs * format erlang version with VersionFormatter * update erlang docs * format golang version with VersionFormatter * refactor formatting in my modules * format helm version with VersionFormatter * format julia version with VersionFormatter * format kotlin version with VersionFormatter * format lua version with VersionFormatter * format nim version with VersionFormatter * format perl version with VersionFormatter * format php version with VersionFormatter * format purescript version with VersionFormatter * format scala version with VersionFormatter * format swift version with VersionFormatter * format terraform version with VersionFormatter * format vagrant version with VersionFormatter * format zig version with VersionFormatter * format elixir version with VersionFormatter * format ocaml version with VersionFormatter * update elixir docs * update golang docs * update helm docs * update julia docs * update kotlin docs * update lua docs * update nim docs * update ocaml docs * update perl docs * update php docs * update purescript docs * update scala docs * update swift docs * update terraform docs * update vagrant docs * update zig docs * format elm version with VersionFormatter * update elm docs * pass module_name as &str to format_module_version
2021-04-29 21:22:20 +00:00
version_format: "v${raw}",
symbol: "🐹 ",
style: "bold cyan",
disabled: false,
not_capable_style: "bold red",
detect_extensions: vec!["go"],
detect_files: vec![
"go.mod",
"go.sum",
"go.work",
"glide.yaml",
"Gopkg.yml",
"Gopkg.lock",
".go-version",
],
detect_folders: vec!["Godeps"],
}
}
}