MCPcopy Create free account
hub / github.com/cloudreve/cloudreve / Decode

Method Decode

service/admin/tools.go:88–104  ·  view source on GitHub ↗
(c *gin.Context)

Source from the content-addressed store, hash-verified

86)
87
88func (service *BsDecodeService) Decode(c *gin.Context) (*BsDecodeRes, error) {
89 bs, err := boolset.FromString(service.Code)
90 if err != nil {
91 return nil, err
92 }
93
94 res := []int{}
95 for i := 0; i < len(*bs)*8; i++ {
96 if bs.Enabled(i) {
97 res = append(res, i)
98 }
99 }
100
101 return &BsDecodeRes{
102 Bool: res,
103 }, nil
104}
105
106type (
107 FetchWOPIDiscoveryService struct {

Callers

nothing calls this directly

Calls 2

FromStringFunction · 0.92
EnabledMethod · 0.65

Tested by

no test coverage detected