github.com/easysoft/zendata@v0.0.0-20240513203326-705bd5a7fd67/internal/pkg/helper/comm.go (about) 1 package helper 2 3 import ( 4 "path/filepath" 5 "strings" 6 7 consts "github.com/easysoft/zendata/internal/pkg/const" 8 "github.com/easysoft/zendata/internal/pkg/domain" 9 ) 10 11 func IsFromProtobuf(file string) bool { 12 return strings.ToLower(filepath.Ext(file)) == "."+consts.FormatProto 13 } 14 15 func IsSelectExcelWithExpr(field domain.DefField) bool { 16 if strings.Index(field.Select, "${") > -1 || 17 strings.Index(field.Where, "${") > -1 { 18 return true 19 20 } else { 21 return false 22 23 } 24 }