duit_go
1package duit_core
2
3import (
4"os"
5)
6
7type DuitView struct{}
8
9// Static reads the content of a file specified by the given file path.
10//
11// It takes a single parameter, filePath, which is a string representing the path to the file.
12// The function returns a string containing the content of the file and an error if any occurred.
13func (view *DuitView) Static(filePath string) (string, error) {
14jsonObj, err := os.ReadFile(filePath)
15
16if err != nil {
17return "", err
18}
19
20return string(jsonObj), nil
21}
22
23// Builder returns a new UiBuilder instance.
24//
25// No parameters.
26// *UiBuilder - a pointer to the new UiBuilder instance.
27func (view *DuitView) Builder() *UiBuilder {
28return &UiBuilder{}
29}
30