Skip to content

Commit fa52c31

Browse files
gophergogogophergogo
authored andcommitted
Refactor to use gopher::orch::core namespace (#3)
Add gopher as top-level namespace for all gopher-orch source code. This provides clearer namespace hierarchy and avoids potential conflicts with other libraries. Namespace structure: gopher::orch::core
1 parent c4ab001 commit fa52c31

6 files changed

Lines changed: 9 additions & 3 deletions

File tree

examples/hello_world/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include "orch/core/hello.h"
66
#include "orch/core/version.h"
77

8-
using namespace orch::core;
8+
using namespace gopher::orch::core;
99

1010
int main(int argc, char* argv[]) {
1111
std::cout << "gopher-orch version: " << Version::string() << std::endl;

examples/mcp_client/mcp_client_example.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include "mcp/json/json_bridge.h"
2222
#include "mcp/types.h"
2323

24-
using namespace orch::core;
24+
using namespace gopher::orch::core;
2525
using namespace mcp;
2626

2727
int main(int argc, char* argv[]) {

include/orch/core/hello.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include <memory>
44
#include <string>
55

6+
namespace gopher {
67
namespace orch {
78
namespace core {
89

@@ -42,3 +43,4 @@ class HelloBuilder {
4243

4344
} // namespace core
4445
} // namespace orch
46+
} // namespace gopher

include/orch/core/version.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#define GOPHER_ORCH_VERSION_STRING "0.1.0"
88

9+
namespace gopher {
910
namespace orch {
1011
namespace core {
1112

@@ -18,3 +19,4 @@ struct Version {
1819

1920
} // namespace core
2021
} // namespace orch
22+
} // namespace gopher

src/orch/hello.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
#include "orch/core/version.h"
66

7+
namespace gopher {
78
namespace orch {
89
namespace core {
910

@@ -55,3 +56,4 @@ std::unique_ptr<Hello> HelloBuilder::build() const {
5556

5657
} // namespace core
5758
} // namespace orch
59+
} // namespace gopher

tests/orch/hello_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#include "orch/core/version.h"
77

8-
using namespace orch::core;
8+
using namespace gopher::orch::core;
99
using namespace testing;
1010

1111
class HelloTest : public ::testing::Test {

0 commit comments

Comments
 (0)