Golang开发岗位1年以上经验要求 - 伦敦地区

Golang开发岗位1年以上经验要求 - 伦敦地区 大家好,

我知道这可能不被允许,但在这个不确定的时期,我觉得最好向所有正在挣扎的社区伸出援手。

我合作的一家公司正在寻找拥有1年以上商业经验的Go语言开发人员加入他们。公司位于伦敦,该职位每周有2/3天远程工作,2/3天在办公室办公。

话虽如此,目前显然是完全远程的,他们也很乐意让你完全远程加入。如果你感兴趣,请联系我。

谢谢, Adam

5 回复

你好,亚当,

我对这个机会很感兴趣。我应该把简历发送到哪里?

更多关于Golang开发岗位1年以上经验要求 - 伦敦地区的实战系列教程也可以访问 https://www.itying.com/category-94-b0.html


你好亚当,

我有兴趣。请查看私信以获取联系方式。

谢谢, 文森特

Adam.parke@rullion.co.uk

顺便提一下,申请这个职位你必须具备在英国工作的资格。

Adam.parke@rullion.co.uk

顺便说一下,申请这个职位你必须具备在英国工作的资格。

以下是一个符合1年以上经验的Go开发人员在伦敦地区可能需要的技术栈和示例代码,供参考:

// 示例:符合商业项目标准的Go REST API结构
package main

import (
    "context"
    "encoding/json"
    "log"
    "net/http"
    "time"
    
    "github.com/gorilla/mux"
    "go.mongodb.org/mongo-driver/mongo"
    "go.mongodb.org/mongo-driver/mongo/options"
)

// 符合生产环境要求的结构设计
type User struct {
    ID        string    `json:"id" bson:"_id"`
    Name      string    `json:"name" bson:"name"`
    Email     string    `json:"email" bson:"email"`
    CreatedAt time.Time `json:"created_at" bson:"created_at"`
}

type UserService struct {
    collection *mongo.Collection
}

func (s *UserService) CreateUser(w http.ResponseWriter, r *http.Request) {
    var user User
    if err := json.NewDecoder(r.Body).Decode(&user); err != nil {
        http.Error(w, err.Error(), http.StatusBadRequest)
        return
    }
    
    user.ID = generateID()
    user.CreatedAt = time.Now()
    
    ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
    defer cancel()
    
    _, err := s.collection.InsertOne(ctx, user)
    if err != nil {
        http.Error(w, err.Error(), http.StatusInternalServerError)
        return
    }
    
    w.Header().Set("Content-Type", "application/json")
    json.NewEncoder(w).Encode(user)
}

// 中间件示例
func loggingMiddleware(next http.Handler) http.Handler {
    return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
        start := time.Now()
        next.ServeHTTP(w, r)
        log.Printf("%s %s %v", r.Method, r.RequestURI, time.Since(start))
    })
}

func main() {
    // 数据库连接(实际项目中应使用配置管理)
    ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
    defer cancel()
    
    client, err := mongo.Connect(ctx, options.Client().ApplyURI("mongodb://localhost:27017"))
    if err != nil {
        log.Fatal(err)
    }
    
    collection := client.Database("mydb").Collection("users")
    userService := &UserService{collection: collection}
    
    // 路由设置
    r := mux.NewRouter()
    r.Use(loggingMiddleware)
    
    r.HandleFunc("/users", userService.CreateUser).Methods("POST")
    r.HandleFunc("/users/{id}", getUserHandler).Methods("GET")
    
    // 启动服务器
    srv := &http.Server{
        Handler:      r,
        Addr:         ":8080",
        WriteTimeout: 15 * time.Second,
        ReadTimeout:  15 * time.Second,
    }
    
    log.Fatal(srv.ListenAndServe())
}
// 并发处理示例
package main

import (
    "fmt"
    "sync"
    "time"
)

func processData(id int, wg *sync.WaitGroup, results chan<- string) {
    defer wg.Done()
    
    // 模拟数据处理
    time.Sleep(100 * time.Millisecond)
    results <- fmt.Sprintf("Processed item %d", id)
}

func main() {
    var wg sync.WaitGroup
    results := make(chan string, 10)
    
    // 启动多个goroutine处理任务
    for i := 1; i <= 5; i++ {
        wg.Add(1)
        go processData(i, &wg, results)
    }
    
    go func() {
        wg.Wait()
        close(results)
    }()
    
    // 收集结果
    for result := range results {
        fmt.Println(result)
    }
}
// 测试示例
package main

import (
    "testing"
    "net/http"
    "net/http/httptest"
)

func TestCreateUserHandler(t *testing.T) {
    req, err := http.NewRequest("POST", "/users", nil)
    if err != nil {
        t.Fatal(err)
    }
    
    rr := httptest.NewRecorder()
    handler := http.HandlerFunc(userHandler)
    
    handler.ServeHTTP(rr, req)
    
    if status := rr.Code; status != http.StatusOK {
        t.Errorf("handler returned wrong status code: got %v want %v", 
            status, http.StatusOK)
    }
}

这些示例展示了Go开发中常见的REST API构建、数据库操作、并发处理和测试等核心技能,符合商业项目开发要求。

回到顶部