You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: render.go
    path of file: ./repos/erda/internal/apps/dop/component-protocol/components/test-dashboard/overview_group/blocks/at/at_rate_executed
    
    the code of the file until where you have to start completion: // Copyright (c) 2021 Terminus, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the L
    
func (t *Text) Render(ctx context.Context, c *cptype.Component, scenario cptype.Scenario, event cptype.ComponentEvent, gs *cptype.GlobalStateData) error {
	h := gshelper.NewGSHelper(gs)
	tv := pkg.TextValue{
		Value: func() string {
			var (
				executeApiNum, totalApiNum int64
				executeRate                float64
			)
			for _, v := range h.GetAtBlockFilterTestPlanList() {
				executeApiNum += v.ExecuteApiNum
				totalApiNum += v.TotalApiNum
			}
			if totalApiNum == 0 {
				executeRate = 0
			} else {
				executeRate = float64(executeApiNum) / float64(totalApiNum) * 100
			}
			return fmt.Sprintf("%.2f", executeRate) + "%"
		}(),
		Kind: cputil.I18n(ctx, "test-case-rate-executed"),
	}
	c.Props = cputil.MustConvertProps(tv.ConvertToProps())
	return nil
}