ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Topics
    2. Tags
    3. golang
    Log in to post
    • All categories
    • stacksofplatesS

      BoltDB API

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion golang go boltdb docker
      1
      3 Votes
      1 Posts
      357 Views
      No one has replied
    • stacksofplatesS

      Functional Options In Go

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion golang development
      2
      3 Votes
      2 Posts
      440 Views
      stacksofplatesS

      So here's a playground example of using functional options and error handling: https://play.golang.org/p/cfw7axv6pjO

      The advantage over method chaining is that we can return our errors correctly this way. Using the following as an example, I can return my error the whole way to the function call in main() and only need to handle it in a single place.

      type MethodOption func(*http.Request) (*http.Request, error) func NewRequest(opt ...MethodOption) (*http.Request, error) { r := &http.Request{} var err error for _, opt := range opt { r, err = opt(r) if err != nil { return nil, err } } return r, nil } func SetURL(URL string) MethodOption { return func(r *http.Request) (*http.Request, error) { u, err := url.Parse(URL) if err != nil { return nil, err } r.URL = u return r, nil } } req, err := NewRequest( SetURL("https://google.com"), ) if err!= nil { fmt.Println(err) os.Exit(1) }
    • stacksofplatesS

      Extending Packages with Go

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion golang
      2
      1 Votes
      2 Posts
      2k Views
      stacksofplatesS

      In this example you wouldn't have to write an interface, but that's part of the power of Go. Interfaces are defined implicitly.

    • stacksofplatesS

      Mocking API Endpoints with Go

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion golang unit test mock api api
      7
      1 Votes
      7 Posts
      908 Views
      stacksofplatesS

      @Danp said in Mocking API Endpoints with Go:

      I know that Postman provides the ability to perform this type of API testing. Has anyone tried this feature?

      I'm sure it does. The problem there though is if you're running in a pipeline you'd have to somehow get Postman downloaded, set up, and configured automatically to test against it. This is just in the standard library so you can unit test in your pipeline automatically.

    • stacksofplatesS

      GitLab Feature Flags

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion feature flags gitlab golang
      2
      3 Votes
      2 Posts
      558 Views
      stacksofplatesS

      To be clear, GitLab uses Unleash for their feature flags which is open source. It also has it's own UI, but it's nice to have it in your code base and not need to run a separate server.

    • stacksofplatesS

      Directory Server in Go

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion golang go webserver
      1
      1 Votes
      1 Posts
      695 Views
      No one has replied
    • mlnewsM

      Google Go So Popular, Go 2 Is Coming

      Watching Ignoring Scheduled Pinned Locked Moved Developer Discussion golang golang 2 google phoronix
      3
      3 Votes
      3 Posts
      1k Views
      scottalanmillerS

      I think someone was like...

      10 DEF GOOGLE_GO 20 GOTO $PUN
    • scottalanmillerS

      Installing Mattermost on CentOS 7

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion linux ntg lab scale scale hc3 mattermost instant messaging centos centos 7 golang projects slack
      17
      6 Votes
      17 Posts
      9k Views
      NashBrydgesN

      For those who were still having problems getting Mattermost running on CentOS 7, I was also having the same problems and couldn't get beyond the postgres install. I found another guide and with a few tweaks, I was able to get this running.

      https://www.howtoforge.com/tutorial/install-mattermost-with-postgresql-and-nginx-on-centos7/

      The change that was required from this guide was in the "Download and Extract Mattermost"

      Instead of...
      [root@mattermost ~]# wget -q "https://github.com/mattermost/platform/releases/download/v2.0.0/mattermost.tar.gz" -O mattermost.tar.gz

      Use this...
      wget https://releases.mattermost.com/3.3.0/mattermost-team-3.3.0-linux-amd64.tar.gz

      Then in the next block, instead of...
      tar -xvzf mattermost.tar.gz

      Use this...
      tar -xvzf mattermost-team-3.3.0-linux-amd64.tar.gz

      After that, follow the guide to the letter and it will get you to this...
      0_1473265786807_upload-d89fe07b-7d71-4d39-8dd7-e00395f6aa84

      @aaronxiang @wirestyle22 @scottalanmiller

    • mlnewsM

      Googles Go Language Turns Six

      Watching Ignoring Scheduled Pinned Locked Moved Developer Discussion google golang programming languages
      1
      1 Votes
      1 Posts
      994 Views
      No one has replied
    • mlnewsM

      Microsoft Broadens Reach by Adding Googles Go Language to Azure

      Watching Ignoring Scheduled Pinned Locked Moved News zdnet google azure languages golang
      1
      1 Votes
      1 Posts
      934 Views
      No one has replied
    • mlnewsM

      Tiobe Rebalances but Java Still Reigns

      Watching Ignoring Scheduled Pinned Locked Moved Developer Discussion tiobe programming languages golang fsharp java scala inforworld
      1
      2 Votes
      1 Posts
      1k Views
      No one has replied
    • 1 / 1