๐งโ๐ป Some code samples with differents behavior
๐๏ธ Highlighting
No line highlighted
palette:
# Palette toggle for light mode
- scheme: default
toggle:
icon: material/brightness-7
name: Switch to dark mode
# Palette toggle for dark mode
- scheme: slate
toggle:
icon: material/brightness-4
name: Switch to light mode
Two blocks highlighted
func main() {
// Dรฉfinition de 2 sous-commandes
helloWorldCmd := &cobra.Command{
Use: "hello",
Short: "Print hello world",
Long: `This command will print hello world for demo purpose`,
Run: func(cmd *cobra.Command, args []string) {
log.Info().Msg("Hello DevopsDDay !")
},
}
rootCmd.AddCommand(helloWorldCmd)
startServerCmd := &cobra.Command{
Use: "start",
Short: "Start the server",
Long: `This command will start the server with some additionnal configuration`,
Run: func(cmd *cobra.Command, args []string) {
setupLogger()
startupHttpServer()
},
}
rootCmd.AddCommand(startServerCmd)
service.SetupOpentelemetryService()
err := rootCmd.Execute()
if err != nil {
os.Exit(1)
}
}
With line numbers
๐ With annotations
- ๐จ Use the material theme
- ๐งฌ Copy code option enablement