func (g *GitStatusWidget) Init() (err error) {
	header := g.buildHeader()

	lopt := &listable.ListWrapperOption{
		Title:         g.options.GetTitle(),
		RealHeight:    g.options.GetHeight(),
		Header:        header,
		LineHighLight: true,
	}
	g.renderer = listable.NewListWrapper(lopt)
	g.isReady = true

	go func() {
		body, err := g.buildBody(g.options.ExecPath)
		if err != nil {
			return
		}
		if body == nil {
			body = []string{
				"Worktree is clean",
			}
		}
		g.renderer.SetBody(body)
		g.renderer.ResetRender()
	}()

	return
}
// Init is the implementation of widget.Init
Init is the implementation of widget.Init
// Init is the implementation of widget . Init
func (g *GitStatusWidget) Init() (err error) {
	header := g.buildHeader()
	lopt := &listable.ListWrapperOption{
		Title:         g.options.GetTitle(),
		RealHeight:    g.options.GetHeight(),
		Header:        header,
		LineHighLight: true,
	}
	g.renderer = listable.NewListWrapper(lopt)
	g.isReady = true
	go func() {
		body, err := g.buildBody(g.options.ExecPath)
		if err != nil {
			return
		}
		if body == nil {
			body = []string{
				"Worktree is clean",
			}
		}
		g.renderer.SetBody(body)
		g.renderer.ResetRender()
	}()
	return
}
func ( g * GitStatusWidget ) Init ( ) ( err error ) { header := g . buildHeader ( ) lopt := & listable . ListWrapperOption { Title : g . options . GetTitle ( ) , RealHeight : g . options . GetHeight ( ) , Header : header , LineHighLight : true , } g . renderer = listable . NewListWrapper ( lopt ) g . isReady = true go func ( ) { body , err := g . buildBody ( g . options . ExecPath ) if err != nil { return } if body == nil { body = [ ] string { " " , } } g . renderer . SetBody ( body ) g . renderer . ResetRender ( ) } ( ) return }
Init is the implementation of widget.Init
Init is the implementation of widget . Init