github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/internal/profile/proto.go (about)

     1  // Copyright 2014 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // This file is a simple protocol buffer encoder and decoder.
     6  //
     7  // A protocol message must implement the message interface:
     8  //   decoder() []decoder
     9  //   encode(*buffer)
    10  //
    11  // The decode method returns a slice indexed by field number that gives the
    12  // function to decode that field.
    13  // The encode method encodes its receiver into the given buffer.
    14  //
    15  // The two methods are simple enough to be implemented by hand rather than
    16  // by using a protocol compiler.
    17  //
    18  // See profile.go for examples of messages implementing this interface.
    19  //
    20  // There is no support for groups, message sets, or "has" bits.
    21  
    22  package profile