view

package
v0.0.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CMD = &cobra.Command{
	Use:   "view",
	Short: "serve the embedded web UI",
	RunE: func(cmd *cobra.Command, args []string) error {
		fileServer, err := NewWebServer()
		if err != nil {
			return err
		}

		http.Handle("/", fileServer)

		addr := ":" + port
		slog.Info("Open webui on http://localhost" + addr)
		return http.ListenAndServe(addr, nil)
	},
}

Functions

func NewWebServer

func NewWebServer() (http.Handler, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL