MCPcopy Create free account
hub / github.com/SeeFlowerX/stackplz / SetFlagsFormat

Method SetFlagsFormat

user/config/config_point_arg.go:39–70  ·  view source on GitHub ↗
(format string)

Source from the content-addressed store, hash-verified

37}
38
39func (this *PointArg) SetFlagsFormat(format string) {
40 var p argtype.IArgType
41 switch format {
42 case "inotify_flags":
43 p = argtype.NewNumFlags(this.TypeIndex, argtype.InotifyFlagsConfig)
44 case "access_flags":
45 p = argtype.NewNumFlags(this.TypeIndex, argtype.AccessFlagsConfig)
46 case "mmap_flags":
47 p = argtype.NewNumFlags(this.TypeIndex, argtype.MMapFlagsConfig)
48 case "mremap_flags":
49 p = argtype.NewNumFlags(this.TypeIndex, argtype.MremapFlagsConfig)
50 case "file_flags":
51 p = argtype.NewNumFlags(this.TypeIndex, argtype.FileFlagsConfig)
52 case "prot_flags":
53 p = argtype.NewNumFlags(this.TypeIndex, argtype.ProtFlagsConfig)
54 case "fcntl_flags":
55 p = argtype.NewNumFlags(this.TypeIndex, argtype.FcntlFlagsConfig)
56 case "statx_flags":
57 p = argtype.NewNumFlags(this.TypeIndex, argtype.StatxFlagsConfig)
58 case "unlink_flags":
59 p = argtype.NewNumFlags(this.TypeIndex, argtype.UnlinkFlagsConfig)
60 case "msg_flags":
61 p = argtype.NewNumFlags(this.TypeIndex, argtype.MsgFlagsConfig)
62 case "socket_flags":
63 p = argtype.NewNumFlags(this.TypeIndex, argtype.SocketFlagsConfig)
64 case "perm_flags":
65 p = argtype.NewNumFlags(this.TypeIndex, argtype.PermissionFlagsConfig)
66 default:
67 panic("...")
68 }
69 this.TypeIndex = p.GetTypeIndex()
70}
71
72func (this *PointArg) SetTypeByName(name string) {
73 this.TypeIndex = argtype.GetArgTypeByName(name).GetTypeIndex()

Callers 1

GetPointArgMethod · 0.95

Calls 2

GetTypeIndexMethod · 0.95
NewNumFlagsFunction · 0.92

Tested by

no test coverage detected