good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pggat
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
gfx
pggat
Commits
6b843600
Commit
6b843600
authored
1 year ago
by
Garet Halliday
Browse files
Options
Downloads
Patches
Plain Diff
merge
parent
f3488881
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/gat/module/module.go
+0
-19
0 additions, 19 deletions
lib/gat/module/module.go
lib/gat/module/registry.go
+0
-22
0 additions, 22 deletions
lib/gat/module/registry.go
with
0 additions
and
41 deletions
lib/gat/module/module.go
deleted
100644 → 0
+
0
−
19
View file @
f3488881
package
module
type
ModuleInfo
struct
{
ID
string
New
func
()
Module
}
type
Module
interface
{
GatModule
()
ModuleInfo
}
var
globalModuleMap
=
newModuleMap
()
func
Register
(
name
string
,
module
Module
)
{
err
:=
globalModuleMap
.
Register
(
name
,
module
)
if
err
!=
nil
{
panic
(
err
)
}
}
This diff is collapsed.
Click to expand it.
lib/gat/module/registry.go
deleted
100644 → 0
+
0
−
22
View file @
f3488881
package
module
import
"fmt"
type
moduleMap
struct
{
m
map
[
string
]
Module
}
func
newModuleMap
()
*
moduleMap
{
return
&
moduleMap
{
m
:
map
[
string
]
Module
{},
}
}
func
(
m
*
moduleMap
)
Register
(
name
string
,
module
Module
)
error
{
_
,
ok
:=
m
.
m
[
name
]
if
ok
{
return
fmt
.
Errorf
(
"module with name already registered: %s"
,
name
)
}
m
.
m
[
name
]
=
module
return
nil
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment