Skip to content

Commit

Permalink
feat: Add display name methods for network and run method
Browse files Browse the repository at this point in the history
  • Loading branch information
mattevans committed Dec 20, 2024
1 parent c80da69 commit 6718920
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions pkg/config/v1/config.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package config

// DisplayName returns the display name of the network.
func (n NetworkName) DisplayName() string {
switch n {
case NetworkName_NETWORK_NAME_MAINNET:
return "Mainnet"
case NetworkName_NETWORK_NAME_SEPOLIA:
return "Sepolia"
case NetworkName_NETWORK_NAME_HOLESKY:
return "Holesky"
default:
return "Unknown"
}
}

// DisplayName returns the display name of the run method.
func (r RunMethod) DisplayName() string {
switch r {
case RunMethod_RUN_METHOD_DOCKER:
return "Docker"
case RunMethod_RUN_METHOD_SYSTEMD:
return "Systemd"
case RunMethod_RUN_METHOD_BINARY:
return "Binary"
default:
return "Unknown"
}
}

0 comments on commit 6718920

Please sign in to comment.