Add Golang skill and reference materials

- Introduced a new skill for Golang, providing comprehensive guidance on writing, debugging, and best practices for Go programming.
- Added reference materials including effective Go guidelines, common patterns, and a quick reference cheat sheet to support users in Go development.
- Created a skill creator guide to assist in developing new skills with structured templates and resource management.
- Implemented scripts for skill initialization and packaging to streamline the skill creation process.
This commit is contained in:
2025-11-04 12:36:36 +00:00
parent cefd0a98e7
commit fa71e9e334
18 changed files with 2858 additions and 110 deletions

View File

@@ -373,21 +373,22 @@ func (s *TestSuite) topologicalSort() {
// Run runs all tests in the suite.
func (s *TestSuite) Run() (results []TestResult, err error) {
client, err := NewClient(s.relayURL)
if err != nil {
return nil, errorf.E("failed to connect to relay: %w", err)
}
defer client.Close()
for _, name := range s.order {
tc := s.tests[name]
if tc == nil {
continue
}
// Create a new client for each test to avoid connection issues
client, clientErr := NewClient(s.relayURL)
if clientErr != nil {
return nil, errorf.E("failed to connect to relay: %w", clientErr)
}
result := tc.Func(client, s.key1, s.key2)
result.Name = name
result.Required = tc.Required
s.results[name] = result
results = append(results, result)
client.Close()
time.Sleep(100 * time.Millisecond) // Small delay between tests
}
return
@@ -408,9 +409,10 @@ func (s *TestSuite) RunTest(testName string) (result TestResult, err error) {
return result, errorf.E("test %s depends on %s which failed", testName, dep)
}
}
client, err := NewClient(s.relayURL)
if err != nil {
return result, errorf.E("failed to connect to relay: %w", err)
// Create a new client for the test
client, clientErr := NewClient(s.relayURL)
if clientErr != nil {
return result, errorf.E("failed to connect to relay: %w", clientErr)
}
defer client.Close()
result = tc.Func(client, s.key1, s.key2)