Brightness Web Server
I am also a novice in Go, so can't say anything about the idiomatic of this approach, but some improvements can offer.


Makes no sense to return -1 in currentBrightness/0  because panic is panic.
By the way, Go instead of processing the code of the return value is customary to return the error value as, for example, in strconv.Atoi or ioutil.ReadFile.
Instead of replace better to use TrimSpace

strings.TrimSpace(string(buff))



Code duplication


Not necessary 2 times used strconv.Itoa(brightness).

str := fmt.Sprint(brightness)
checkError(ioutil.WriteFile("brightness", []byte(str), os.ModeDevice))
fmt.Fprintf(w, str)

Since the error handling in Go program a common thing, easy to create a special function.

func checkError(err error) {
    if err != nil {
            log.Fatal(err)
        }
    }



3.
In both handlers have a recurring part: update the value stored in the file. This can also be avoided creating a new function.

update := func(w http.ResponseWriter, brightness int) {
    str := fmt.Sprint(brightness)
    checkError(ioutil.WriteFile("brightness", []byte(str), os.ModeDevice))
    fmt.Fprintf(w, str)
}


Then get as result:

package main

import (
    "fmt"
    "io/ioutil"
    "log"
    "net/http"
    "os"
    "strconv"
    "strings"
)

func main() {

    const BRIGHTNESS_AMOUNT = 25

    maxBrightness := func() int {
        buff, err := ioutil.ReadFile("max_brightness")
        checkError(err)
        buffInt, err := strconv.Atoi(strings.TrimSpace(string(buff)))
        checkError(err)
        return buffInt
    }()

    currentBrightness := func() int {
        buff, err := ioutil.ReadFile("brightness")
        checkError(err)
        buffInt, err := strconv.Atoi(strings.TrimSpace(string(buff)))
        checkError(err)
        return buffInt
    }

    update := func(w http.ResponseWriter, brightness int) {
        str := fmt.Sprint(brightness)
        checkError(ioutil.WriteFile("brightness", []byte(str), os.ModeDevice))
        fmt.Fprintf(w, str)
    }

    http.HandleFunc("/increase", func(w http.ResponseWriter, r *http.Request) {
        if (currentBrightness() + BRIGHTNESS_AMOUNT) &lt; maxBrightness {
            update(w, currentBrightness()+BRIGHTNESS_AMOUNT)
        } else {
            update(w, maxBrightness)
        }
    })

    http.HandleFunc("/decrease", func(w http.ResponseWriter, r *http.Request) {
        if (currentBrightness() - BRIGHTNESS_AMOUNT) &gt; 0 {
            update(w, currentBrightness()-BRIGHTNESS_AMOUNT)
        } else {
            update(w, 0)
        }
    })

    log.Fatal(http.ListenAndServe(":5600", nil))

}

func checkError(err error) {
    if err != nil {
        log.Fatal(err)
    }
}