This file is indexed.

/usr/share/gocode/src/gopkg.in/inconshreveable/log15.v2/handler_appengine.go is in golang-gopkg-inconshreveable-log15.v2-dev 2.11+git20150921.0.b105bd3-0ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// +build appengine

package log15

import "sync"

// swapHandler wraps another handler that may be swapped out
// dynamically at runtime in a thread-safe fashion.
type swapHandler struct {
	handler interface{}
	lock    sync.RWMutex
}

func (h *swapHandler) Log(r *Record) error {
	h.lock.RLock()
	defer h.lock.RUnlock()

	return h.handler.(Handler).Log(r)
}

func (h *swapHandler) Swap(newHandler Handler) {
	h.lock.Lock()
	defer h.lock.Unlock()

	h.handler = newHandler
}